Alternative fix which is more in line with the original diff, ref. #18

This commit is contained in:
bakkeby 2020-03-22 11:09:30 +01:00
parent f401a51fa8
commit 9344ff61dd

View File

@ -87,16 +87,11 @@ updatesystray(void)
InputOutput, visual,
CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa);
#else
XSetWindowAttributes wa = {
.override_redirect = True,
.background_pixel = scheme[SchemeNorm][ColBg].pixel,
.border_pixel = 0,
.colormap = DefaultColormap(dpy, screen),
.event_mask = ButtonPressMask|ExposureMask
};
systray->win = XCreateWindow(dpy, root, x - xpad, m->by + ypad, w, bh, 0, DefaultDepth(dpy, screen),
InputOutput, DefaultVisual(dpy, screen),
CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa);
systray->win = XCreateSimpleWindow(dpy, root, x - xpad, m->by + ypad, w, bh, 0, 0, scheme[SchemeSel][ColBg].pixel);
wa.event_mask = ButtonPressMask | ExposureMask;
wa.override_redirect = True;
wa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
XChangeWindowAttributes(dpy, systray->win, CWEventMask|CWOverrideRedirect|CWBackPixel, &wa);
#endif // ALPHA_PATCH
XSelectInput(dpy, systray->win, SubstructureNotifyMask);
XChangeProperty(dpy, systray->win, netatom[NetSystemTrayOrientation], XA_CARDINAL, 32,