diff options
Diffstat (limited to 'src/Rahm/Desktop/Common.hs')
| -rw-r--r-- | src/Rahm/Desktop/Common.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs index c3a6a31..5c29a1c 100644 --- a/src/Rahm/Desktop/Common.hs +++ b/src/Rahm/Desktop/Common.hs @@ -48,7 +48,6 @@ import qualified Rahm.Desktop.StackSet as S workspaces, ) import Text.Printf (printf) -import qualified XMonad as X import XMonad ( ScreenId, Window, @@ -69,6 +68,7 @@ import XMonad withFocused, withWindowSet, ) +import qualified XMonad as X import XMonad.Prompt (XPrompt (commandToComplete, showXPrompt)) import XMonad.Util.XUtils (pixelToString, stringToPixel) @@ -80,8 +80,8 @@ data Location = Location deriving (Read, Show, Eq, Ord) focusLocation :: Location -> X () -focusLocation (Location ws Nothing) = windows $ S.greedyView ws -focusLocation (Location _ (Just win)) = windows $ S.focusWindow win +focusLocation (Location ws mWin) = + windows $ maybe id S.focusWindow mWin . S.greedyView ws masterWindow :: MaybeT X Window masterWindow = MaybeT $ @@ -225,4 +225,3 @@ click = do (dpy, root) <- asks $ (,) <$> display <*> X.theRoot (_, _, window, _, _, _, _, _) <- io $ X.queryPointer dpy root focus window - |