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,