aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-28 04:51:35 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-28 04:51:35 +0200
commitbc4224c22b9e655bde2eda9bf9374c5bff5d14c1 (patch)
treef9deeb26cc6ad1d2b87d679df182c9f65b9646b0 /Operations.hs
parent01c446343402990ea85f37704733107ea69993d7 (diff)
downloadxmonad-bc4224c22b9e655bde2eda9bf9374c5bff5d14c1.tar.gz
xmonad-bc4224c22b9e655bde2eda9bf9374c5bff5d14c1.tar.xz
xmonad-bc4224c22b9e655bde2eda9bf9374c5bff5d14c1.zip
Use (Int,Int,Int,Int) for arbitrary gaps on any side of the screen
darcs-hash:20070528025135-9c5c1-3c0f63ac557da57cd268cd0129b9ce90692631e4.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Operations.hs b/Operations.hs
index 8d99569..56e15d9 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -68,8 +68,8 @@ view :: WorkspaceId -> X ()
view = windows . W.view
-- | Modify the size of the status gap at the top of the screen
-modifyGap :: (Int -> Int) -> X ()
-modifyGap f = modify (\s -> s { statusGap = max 0 (f (statusGap s)) }) >> refresh
+modifyGap :: ((Int,Int,Int,Int) -> (Int,Int,Int,Int)) -> X ()
+modifyGap f = modify (\s -> s { statusGap = f (statusGap s) }) >> refresh
-- | Kill the currently focused client. If we do kill it, we'll get a
-- delete notify back from X.
@@ -127,7 +127,7 @@ hide w = withDisplay $ \d -> do
--
refresh :: X ()
refresh = do
- XState { windowset = ws, layouts = fls, xineScreens = xinesc, statusGap = gap } <- get
+ XState { windowset = ws, layouts = fls, xineScreens = xinesc, statusGap = (gt,gb,gl,gr) } <- get
d <- asks display
-- for each workspace, layout the currently visible workspaces
@@ -139,7 +139,10 @@ refresh = do
-- now tile the windows on this workspace, and set gap maybe on current
rs <- doLayout l (if w == W.current ws
- then Rectangle sx (sy + fromIntegral gap) sw (sh - fromIntegral gap)
+ then Rectangle (sx + fromIntegral gl)
+ (sy + fromIntegral gt)
+ (sw - fromIntegral (gl + gr))
+ (sh - fromIntegral (gt + gb))
else r) (W.index this)
mapM_ (\(win,rect) -> io (tileWindow d win rect)) rs