From b3b29d35e543e08ac449a5831e2c916745a8b0a3 Mon Sep 17 00:00:00 2001 From: tsxv478 Date: Sat, 13 Jan 2024 12:16:20 +0300 Subject: different class when centered --- dmenu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3