Commits

Jan Christoph Ebersbach  committed 47812d8

update system tray on expose events as well

  • Participants
  • Parent commits 5d0d9ad

Comments (0)

Files changed (1)

File systray.patch

 
 diff -r 538dcda1e97f config.def.h
 --- a/config.def.h	Sun Oct 14 15:51:34 2012 +0200
-+++ b/config.def.h	Sat Feb 16 13:03:11 2013 +0100
++++ b/config.def.h	Fri Mar 29 15:24:41 2013 +0100
 @@ -12,6 +12,8 @@
  static const char floatselbordercolor[]  = "#ff0000";
  static const unsigned int borderpx  = 1;        /* border pixel of windows */
  
 diff -r 538dcda1e97f dwm.c
 --- a/dwm.c	Sun Oct 14 15:51:34 2012 +0200
-+++ b/dwm.c	Sat Feb 16 13:03:11 2013 +0100
++++ b/dwm.c	Fri Mar 29 15:24:41 2013 +0100
 @@ -56,12 +56,30 @@
  #define TAGMASK                 ((1 << LENGTH(tags)) - 1)
  #define TEXTW(X)                (textnw(X, strlen(X)) + dc.font.height)
  }
  
  void
-@@ -1018,10 +1109,17 @@
+@@ -933,6 +1024,7 @@
+ 
+ 	if(ev->count == 0 && (m = wintomon(ev->window)))
+ 		drawbar(m);
++	updatesystray();
+ }
+ 
+ void
+@@ -1018,10 +1110,17 @@
  	unsigned long dl;
  	unsigned char *p = NULL;
  	Atom da, atom = None;
  		XFree(p);
  	}
  	return atom;
-@@ -1063,6 +1161,15 @@
+@@ -1063,6 +1162,15 @@
  	return result;
  }
  
  Bool
  gettextprop(Window w, Atom atom, char *text, unsigned int size) {
  	char **list = NULL;
-@@ -1197,7 +1304,7 @@
+@@ -1197,7 +1305,7 @@
  killclient(const Arg *arg) {
  	if(!selmon->sel)
  		return;
  		XGrabServer(dpy);
  		XSetErrorHandler(xerrordummy);
  		XSetCloseDownMode(dpy, DestroyAll);
-@@ -1291,6 +1398,12 @@
+@@ -1291,6 +1399,12 @@
  maprequest(XEvent *e) {
  	static XWindowAttributes wa;
  	XMapRequestEvent *ev = &e->xmaprequest;
  
  	if(!XGetWindowAttributes(dpy, ev->window, &wa))
  		return;
-@@ -1416,6 +1529,16 @@
+@@ -1416,6 +1530,16 @@
  	Window trans;
  	XPropertyEvent *ev = &e->xproperty;
  
  	if((ev->window == root) && (ev->atom == XA_WM_NAME))
  		updatestatus();
  	else if(ev->state == PropertyDelete)
-@@ -1467,12 +1590,33 @@
+@@ -1467,12 +1591,33 @@
  }
  
  void
  resizeclient(Client *c, int x, int y, int w, int h) {
  	XWindowChanges wc;
  
-@@ -1539,6 +1683,18 @@
+@@ -1539,6 +1684,18 @@
  }
  
  void
  restack(Monitor *m) {
  	Client *c;
  	XEvent ev;
-@@ -1620,25 +1776,35 @@
+@@ -1620,25 +1777,35 @@
  }
  
  Bool
  	}
  	return exists;
  }
-@@ -1651,7 +1817,7 @@
+@@ -1651,7 +1818,7 @@
   		                XA_WINDOW, 32, PropModeReplace,
   		                (unsigned char *) &(c->win), 1);
  	}
  }
  
  void
-@@ -1736,12 +1902,18 @@
+@@ -1736,12 +1903,18 @@
  	wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
  	netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
  	netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
  	/* init cursors */
  	cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
  	cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
-@@ -1760,6 +1932,8 @@
+@@ -1760,6 +1933,8 @@
  	XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
  	if(!dc.font.set)
  		XSetFont(dpy, dc.gc, dc.font.xfont->fid);
  	/* init bars */
  	updatebars();
  	updatestatus();
-@@ -1911,7 +2085,18 @@
+@@ -1911,7 +2086,18 @@
  togglebar(const Arg *arg) {
  	selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
  	updatebarpos(selmon);
  	arrange(selmon);
  }
  
-@@ -2054,11 +2239,18 @@
+@@ -2054,11 +2240,18 @@
  		else
  			unmanage(c, False);
  	}
  	XSetWindowAttributes wa = {
  		.override_redirect = True,
  		.background_pixmap = ParentRelative,
-@@ -2067,10 +2259,15 @@
+@@ -2067,10 +2260,15 @@
  	for(m = mons; m; m = m->next) {
  		if (m->barwin)
  			continue;
  		XMapRaised(dpy, m->barwin);
  	}
  }
-@@ -2264,6 +2461,107 @@
+@@ -2264,6 +2462,107 @@
  }
  
  void
  updatewindowtype(Client *c) {
  	Atom state = getatomprop(c, netatom[NetWMState]);
  	Atom wtype = getatomprop(c, netatom[NetWMWindowType]);
-@@ -2374,6 +2672,16 @@
+@@ -2374,6 +2673,16 @@
  	return selmon;
  }