1. Jan Christoph Ebersbach
  2. dwm-clean-patches

Commits

Jan Christoph Ebersbach  committed 4352159

update systray patches to redraw the background properly

  • Participants
  • Parent commits ef2e418
  • Branches default

Comments (0)

Files changed (2)

File 6.0/1590_ec4baab78314_tag_6.0/dwm-6.0-systray.diff

View file
  	XSync(dpy, False);
  	XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
  }
-@@ -530,9 +571,48 @@
+@@ -530,9 +572,49 @@
  
  void
  clientmessage(XEvent *e) {
 +			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);
  		                          CopyFromParent, DefaultVisual(dpy, screen),
  		                          CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
  		XDefineCursor(dpy, m->barwin, cursor[CurNormal]);
-@@ -2011,6 +2205,104 @@
+@@ -2011,6 +2208,107 @@
  }
  
  void
 +	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);
 +}
 +

File 6.0/1605_c794a9f5ae5e/dwm-6.0-systray.diff

View file
  	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) {
 +			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);
  		XMapRaised(dpy, m->barwin);
  	}
  }
-@@ -2051,6 +2247,104 @@
+@@ -2051,6 +2250,107 @@
  }
  
  void
 +	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);
 +}
 +