summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-07-31 10:31:20 +0200
committerbakkeby <[email protected]>2020-07-31 10:31:20 +0200
commitd85dc0404f5542b4d9800e2db91df7a577b7f6f2 (patch)
tree371852f2583d90b39f6b4ee15f7b094252d6685b
parent68d9a1d7cce9329abfc2590aedc4e24bdbf4c606 (diff)
downloaddwm-flexipatch-d85dc0404f5542b4d9800e2db91df7a577b7f6f2.tar.gz
dwm-flexipatch-d85dc0404f5542b4d9800e2db91df7a577b7f6f2.zip
systray: add / override class hints for the systray clients (allows for compositors to exlude them from shadows)
-rw-r--r--dwm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 2b1d2b7..d60d58e 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1048,6 +1048,7 @@ clientmessage(XEvent *e)
c->next = systray->icons;
systray->icons = c;
XGetWindowAttributes(dpy, c->win, &wa);
+
c->x = c->oldx = c->y = c->oldy = 0;
c->w = c->oldw = wa.width;
c->h = c->oldh = wa.height;
@@ -1060,6 +1061,8 @@ clientmessage(XEvent *e)
updatesystrayicongeom(c, wa.width, wa.height);
XAddToSaveSet(dpy, c->win);
XSelectInput(dpy, c->win, StructureNotifyMask | PropertyChangeMask | ResizeRedirectMask);
+ XClassHint ch = {"dwmsystray", "dwmsystray"};
+ XSetClassHint(dpy, c->win, &ch);
XReparentWindow(dpy, c->win, systray->win, 0, 0);
/* use parents background color */
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
@@ -3448,7 +3451,7 @@ updatebars(void)
XClassHint ch = {"dwm", "dwm"};
for (m = mons; m; m = m->next) {
for (bar = m->bar; bar; bar = bar->next) {
- if (!bar->win) { // TODO add static status controls to not create / show extra bar?
+ if (!bar->win) {
#if BAR_ALPHA_PATCH
bar->win = XCreateWindow(dpy, root, bar->bx, bar->by, bar->bw, bar->bh, 0, depth,
InputOutput, visual,