diff options
| author | bakkeby <[email protected]> | 2020-03-22 19:39:08 +0100 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-03-22 19:39:08 +0100 |
| commit | 39df3ca2ec42a72ad97946a1bb2519e9bd711718 (patch) | |
| tree | bd6e5f2a4a3a777e51d5de9c2dbd364a69009254 /patch | |
| parent | 9344ff61dd0fcc3f8199e3aa1ac467d16c9f2383 (diff) | |
| download | dwm-flexipatch-39df3ca2ec42a72ad97946a1bb2519e9bd711718.tar.gz dwm-flexipatch-39df3ca2ec42a72ad97946a1bb2519e9bd711718.zip | |
Replacing SchemeSel background for systray with that of SchemeNorm
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/systray.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/patch/systray.c b/patch/systray.c index bf30073..e3b0796 100644 --- a/patch/systray.c +++ b/patch/systray.c @@ -75,23 +75,18 @@ updatesystray(void) if (!(systray = (Systray *)calloc(1, sizeof(Systray)))) die("fatal: could not malloc() %u bytes\n", sizeof(Systray)); + wa.override_redirect = True; + wa.event_mask = ButtonPressMask|ExposureMask; + wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; + wa.border_pixel = 0; #if ALPHA_PATCH - XSetWindowAttributes wa = { - .override_redirect = True, - .background_pixel = scheme[SchemeNorm][ColBg].pixel, - .border_pixel = 0, - .colormap = cmap, - .event_mask = ButtonPressMask|ExposureMask - }; + wa.colormap = cmap; systray->win = XCreateWindow(dpy, root, x - xpad, m->by + ypad, w, bh, 0, depth, InputOutput, visual, CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa); #else - 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); + systray->win = XCreateSimpleWindow(dpy, root, x - xpad, m->by + ypad, w, bh, 0, 0, scheme[SchemeNorm][ColBg].pixel); + XChangeWindowAttributes(dpy, systray->win, CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWEventMask, &wa); #endif // ALPHA_PATCH XSelectInput(dpy, systray->win, SubstructureNotifyMask); XChangeProperty(dpy, systray->win, netatom[NetSystemTrayOrientation], XA_CARDINAL, 32, @@ -115,6 +110,8 @@ updatesystray(void) return; } } + + drw_setscheme(drw, scheme[SchemeNorm]); for (w = 0, i = systray->icons; i; i = i->next) { /* make sure the background color stays the same */ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; |
