aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-06-15 00:07:55 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-06-15 01:05:17 +0300
commitc5e252aeebcc49669207d2bfde2f927d82260b79 (patch)
tree0e83bd5438b0dfab5441298654336edcfb0afa23 /monsterwm.c
parent31ca508801b8c8f8df3ead29e1a9811b3a7c6b55 (diff)
new client should always be current on its desktop
this fixes a bug that caused new clients on other non focused desktops (FOLLOW_WINDOW False and follow=False) to not become the current client of their desktop. this introduced the (now fixed) bug at cec4ecc (fixes #9): bugfix: null dereference in removeclient() caused freezes
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c
index de0de82..4050991 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -461,9 +461,10 @@ void maprequest(XEvent *e) {
setfullscreen(c, (*(Atom *)state == netatoms[NET_FULLSCREEN]));
if (state) XFree(state);
+ update_current(c);
if (cd != newdsk) select_desktop(cd);
- if (cd == newdsk) { if (!c->isfloating) tile(); XMapWindow(dis, c->win); update_current(c); }
- else if (follow) { change_desktop(&(Arg){.i = newdsk}); update_current(c); }
+ if (cd == newdsk) { if (!c->isfloating) tile(); XMapWindow(dis, c->win); }
+ else if (follow) change_desktop(&(Arg){.i = newdsk});
grabbuttons(c);
desktopinfo();