aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-07-08 00:38:42 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-07-08 00:38:42 +0200
commit9f826eef5b1a302c28dbdce0ffb6456b8a36a2ed (patch)
tree14e250e24c30ab30fd39607f7d0a34df6af880ca /Operations.hs
parentd3c944fe973e2e55ac7a4ff9d804e1440ce7a100 (diff)
downloadxmonad-9f826eef5b1a302c28dbdce0ffb6456b8a36a2ed.tar.gz
xmonad-9f826eef5b1a302c28dbdce0ffb6456b8a36a2ed.tar.xz
xmonad-9f826eef5b1a302c28dbdce0ffb6456b8a36a2ed.zip
Operations.screenWorkspace: return Nothing when the screen does not exist
darcs-hash:20070707223842-a5988-7cd70e25326d577a30279c976ae64bce3f70f2df.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Operations.hs b/Operations.hs
index 0a8bd31..68524f1 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -439,9 +439,9 @@ splitVerticallyBy f = (mirrorRect *** mirrorRect) . splitHorizontallyBy f . mirr
------------------------------------------------------------------------
-- Utilities
--- | Return workspace visible on screen 'sc', or 0.
-screenWorkspace :: ScreenId -> X WorkspaceId
-screenWorkspace sc = withWindowSet $ return . fromMaybe 0 . W.lookupWorkspace sc
+-- | Return workspace visible on screen 'sc', or Nothing.
+screenWorkspace :: ScreenId -> X (Maybe WorkspaceId)
+screenWorkspace sc = withWindowSet $ return . W.lookupWorkspace sc
-- | Apply an X operation to the currently focused window, if there is one.
withFocused :: (Window -> X ()) -> X ()