systray: add / override class hints for the systray clients (allows for compositors to exlude them from shadows)

pull/48/head
bakkeby 4 years ago
parent 68d9a1d7cc
commit d85dc0404f

@ -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,

Loading…
Cancel
Save