summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsxv478 <atci39@rambler.ru>2024-01-13 12:16:20 +0300
committertsxv478 <atci39@rambler.ru>2024-01-13 12:16:20 +0300
commitb3b29d35e543e08ac449a5831e2c916745a8b0a3 (patch)
tree24b696503628c44045d73e36106886c5e89491cf
parentb126dcea02aa3d97dee9cbc0ed6e4773d00ca02f (diff)
different class when centered
-rw-r--r--dmenu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 59b9d48..3ad4812 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -626,6 +626,7 @@ setup(void)
Window w, dw, *dws;
XWindowAttributes wa;
XClassHint ch = {"dmenu", "dmenu"};
+ XClassHint chc = {"dmenu_c", "dmenu_c"};
#ifdef XINERAMA
XineramaScreenInfo *info;
Window pw;
@@ -711,8 +712,11 @@ setup(void)
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
if (border_width)
XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
- XSetClassHint(dpy, win, &ch);
+ if (centered)
+ XSetClassHint(dpy, win, &chc);
+ else
+ XSetClassHint(dpy, win, &ch);
/* input methods */
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)