From 399f3ebe2337c0463ac6fde75079d144cdfa5f16 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 21 Jul 2022 23:29:38 -0400 Subject: [PATCH] FIX missing window bug --- app/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index 1f71ead..c77d818 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -148,10 +148,12 @@ updateXCape = do dpy <- asks display atom <- asks netActiveWindow root <- asks theRoot + -- find the active window; if none are found, assume there are no windows + -- open, in which case xcape should be running prop <- io $ getWindowProperty32 dpy atom root case prop of Just [aw] -> getAppName (fromIntegral aw) >>= startOrKillXCape - _ -> return () + _ -> startXCape -- | Given an event, call a handler. In this case the only thing we care about -- are PropertyNotify events where the atom is _NET_ACTIVE_WINDOW, which will