diff options
-rw-r--r-- | XMonad/Hooks/EwmhDesktops.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index c6fd3a2..f831589 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -61,10 +61,9 @@ ewmhDesktopsLogHook = withWindowSet $ \s -> do setDesktopNames (map W.tag ws) -- Current desktop - fromMaybe (return ()) $ do - n <- W.lookupWorkspace 0 s - i <- elemIndex n $ map W.tag ws - return $ setCurrentDesktop i + let curr = fromJust $ elemIndex (W.tag (W.workspace (W.current s))) $ map W.tag ws + + setCurrentDesktop curr setClientList wins |