From c5e252aeebcc49669207d2bfde2f927d82260b79 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Fri, 15 Jun 2012 00:07:55 +0300 Subject: 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 --- monsterwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'monsterwm.c') 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(); -- cgit v1.3.1