mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
systray: add / override class hints for the systray clients (allows for compositors to exlude them from shadows)
This commit is contained in:
parent
68d9a1d7cc
commit
d85dc0404f
5
dwm.c
5
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user