From f77dbc7ad2ad8ad2ea40294416c1fd878eb7428d Mon Sep 17 00:00:00 2001 From: Joseph <119084558+DerjenigeUberMensch@users.noreply.github.com> Date: Fri, 23 Aug 2024 08:18:29 +0800 Subject: [PATCH] Fixed oversight when unmanging windows from previous commit --- src/events.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/events.c b/src/events.c index 82be0fc..94ccf1a 100644 --- a/src/events.c +++ b/src/events.c @@ -987,9 +987,18 @@ destroynotify(XCBGenericEvent *event) if(c) { + u32 sticky = ISSTICKY(c); + Desktop *desk = c->desktop; unmanage(c, 1); + /* if desktop was selected re arrange (no need to waste resources if not visbile) */ + if(desk->mon->desksel == desk || sticky) + { + focus(NULL); + arrange(desk); + } /* unused due to race conditions */ /* PropListen(_wm.handler, _wm.dpy, win, PropUnmanage); */ + sync = 1; } if(sync) @@ -1066,9 +1075,18 @@ unmapnotify(XCBGenericEvent *event) if(c) { + u32 sticky = ISSTICKY(c); + Desktop *desk = c->desktop; unmanage(c, 1); + /* if desktop was selected re arrange (no need to waste resources if not visbile) */ + if(desk->mon->desksel == desk || sticky) + { + focus(NULL); + arrange(desk); + } /* unused due to race conditions */ /* PropListen(_wm.handler, _wm.dpy, win, PropUnmanage); */ + sync = 1; } if(sync)