sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8ac37c03d73c522293441f12fc9213b8e40fafaf
parent 873dd58d751ac6fe15a933fc3ed2ce2eedca7d52
Author: Jan Christoph Ebersbach <jceb@e-jc.de>
Date:   Sat, 16 Feb 2013 13:13:47 +0100

update systray patches to redraw the background properly

Diffstat:
Mdwm.suckless.org/patches/dwm-6.0-systray.diff | 10+++++++---
Mdwm.suckless.org/patches/dwm-c794a9f5ae5e-systray.diff | 10+++++++---
2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-6.0-systray.diff b/dwm.suckless.org/patches/dwm-6.0-systray.diff @@ -143,7 +143,7 @@ diff -r ec4baab78314 dwm.c XSync(dpy, False); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); } -@@ -530,9 +571,48 @@ +@@ -530,9 +572,49 @@ void clientmessage(XEvent *e) { @@ -177,7 +177,8 @@ diff -r ec4baab78314 dwm.c + XReparentWindow(dpy, c->win, systray->win, 0, 0); + /* use parents background pixmap */ + swa.background_pixmap = ParentRelative; -+ XChangeWindowAttributes(dpy, c->win, CWBackPixmap, &swa); ++ swa.background_pixel = dc.norm[ColBG]; ++ XChangeWindowAttributes(dpy, c->win, CWBackPixmap|CWBackPixel, &swa); + sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_EMBEDDED_NOTIFY, 0 , systray->win, XEMBED_EMBEDDED_VERSION); + /* FIXME not sure if I have to send these events, too */ + sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_FOCUS_IN, 0 , systray->win, XEMBED_EMBEDDED_VERSION); @@ -499,7 +500,7 @@ diff -r ec4baab78314 dwm.c CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); XDefineCursor(dpy, m->barwin, cursor[CurNormal]); -@@ -2011,6 +2205,104 @@ +@@ -2011,6 +2208,107 @@ } void @@ -597,6 +598,9 @@ diff -r ec4baab78314 dwm.c + w = w ? w + systrayspacing : 1; + x -= w; + XMoveResizeWindow(dpy, systray->win, x, selmon->by, w, bh); ++ /* redraw background */ ++ XSetForeground(dpy, dc.gc, dc.norm[ColBG]); ++ XFillRectangle(dpy, systray->win, dc.gc, 0, 0, w, bh); + XSync(dpy, False); +} + diff --git a/dwm.suckless.org/patches/dwm-c794a9f5ae5e-systray.diff b/dwm.suckless.org/patches/dwm-c794a9f5ae5e-systray.diff @@ -143,7 +143,7 @@ diff -r c794a9f5ae5e dwm.c XSync(dpy, False); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XDeleteProperty(dpy, root, netatom[NetActiveWindow]); -@@ -533,9 +574,48 @@ +@@ -533,9 +575,49 @@ void clientmessage(XEvent *e) { @@ -177,7 +177,8 @@ diff -r c794a9f5ae5e dwm.c + XReparentWindow(dpy, c->win, systray->win, 0, 0); + /* use parents background pixmap */ + swa.background_pixmap = ParentRelative; -+ XChangeWindowAttributes(dpy, c->win, CWBackPixmap, &swa); ++ swa.background_pixel = dc.norm[ColBG]; ++ XChangeWindowAttributes(dpy, c->win, CWBackPixmap|CWBackPixel, &swa); + sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_EMBEDDED_NOTIFY, 0 , systray->win, XEMBED_EMBEDDED_VERSION); + /* FIXME not sure if I have to send these events, too */ + sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_FOCUS_IN, 0 , systray->win, XEMBED_EMBEDDED_VERSION); @@ -506,7 +507,7 @@ diff -r c794a9f5ae5e dwm.c XMapRaised(dpy, m->barwin); } } -@@ -2051,6 +2247,104 @@ +@@ -2051,6 +2250,107 @@ } void @@ -604,6 +605,9 @@ diff -r c794a9f5ae5e dwm.c + w = w ? w + systrayspacing : 1; + x -= w; + XMoveResizeWindow(dpy, systray->win, x, selmon->by, w, bh); ++ /* redraw background */ ++ XSetForeground(dpy, dc.gc, dc.norm[ColBG]); ++ XFillRectangle(dpy, systray->win, dc.gc, 0, 0, w, bh); + XSync(dpy, False); +} +