Commits

Anonymous committed 3fc594d

don't raise the systray every time the function updatesystray is called

  • Participants
  • Parent commits 28cb114

Comments (0)

Files changed (1)

File systray.patch

 URL: http://dwm.suckless.org/patches/systray
 Implements a system tray for dwm.
 
-diff -r 321da39fe7ef config.def.h
---- a/config.def.h	Sun Aug 05 19:24:49 2012 +0200
-+++ b/config.def.h	Sun Aug 05 20:04:57 2012 +0200
+diff -r bc8727215c30 config.def.h
+--- a/config.def.h	Tue Aug 07 07:59:07 2012 +0200
++++ b/config.def.h	Wed Aug 08 19:27:07 2012 +0200
 @@ -12,6 +12,8 @@
  static const char floatselbordercolor[]  = "#ff0000";
  static const unsigned int borderpx  = 1;        /* border pixel of windows */
  static const Bool showbar           = True;     /* False means no bar */
  static const Bool topbar            = True;     /* False means bottom bar */
  
-diff -r 321da39fe7ef dwm.c
---- a/dwm.c	Sun Aug 05 19:24:49 2012 +0200
-+++ b/dwm.c	Sun Aug 05 20:04:57 2012 +0200
+diff -r bc8727215c30 dwm.c
+--- a/dwm.c	Tue Aug 07 07:59:07 2012 +0200
++++ b/dwm.c	Wed Aug 08 19:27:07 2012 +0200
 @@ -56,12 +56,30 @@
  #define TAGMASK                 ((1 << LENGTH(tags)) - 1)
  #define TEXTW(X)                (textnw(X, strlen(X)) + dc.font.height)
  	XSetWindowAttributes wa = {
  		.override_redirect = True,
  		.background_pixmap = ParentRelative,
-@@ -2064,7 +2255,10 @@
+@@ -2064,10 +2255,15 @@
  	for(m = mons; m; m = m->next) {
  		if (m->barwin)
  			continue;
  		                          CopyFromParent, DefaultVisual(dpy, screen),
  		                          CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
  		XDefineCursor(dpy, m->barwin, cursor[CurNormal]);
-@@ -2261,6 +2455,105 @@
++		if(showsystray && m == selmon)
++			XMapRaised(dpy, systray->win);
+ 		XMapRaised(dpy, m->barwin);
+ 	}
+ }
+@@ -2261,6 +2457,104 @@
  }
  
  void
 +	w = w ? w + systrayspacing : 1;
 + 	x -= w;
 +	XMoveResizeWindow(dpy, systray->win, x, selmon->by, w, bh);
-+	XMapRaised(dpy, systray->win);
 +	XSync(dpy, False);
 +}
 +
  updatewindowtype(Client *c) {
  	Atom state = getatomprop(c, netatom[NetWMState]);
  	Atom wtype = getatomprop(c, netatom[NetWMWindowType]);
-@@ -2371,6 +2664,16 @@
+@@ -2371,6 +2665,16 @@
  	return selmon;
  }