diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-06-11 08:19:30 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-06-11 08:19:30 +0200 |
commit | 110abbab167572519fc3d8d12c92bd7ee483502d (patch) | |
tree | e844c1da6257e1486d3302128618c28a5b2cdf96 | |
parent | f6046249ed91624e56cf689cb9305d94aed28836 (diff) | |
download | xmonad-110abbab167572519fc3d8d12c92bd7ee483502d.tar.gz xmonad-110abbab167572519fc3d8d12c92bd7ee483502d.tar.xz xmonad-110abbab167572519fc3d8d12c92bd7ee483502d.zip |
Ensure windows get at least 1 pixel for width/height
darcs-hash:20070611061930-a5988-a427df20194b8b0aa53507676dc5d882b20de0b6.gz
Diffstat (limited to '')
-rw-r--r-- | Operations.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs index 7b8576b..9a47d55 100644 --- a/Operations.hs +++ b/Operations.hs @@ -256,8 +256,11 @@ clearEnterEvents = withDisplay $ \d -> io $ do tileWindow :: Window -> Rectangle -> X () tileWindow w r = withDisplay $ \d -> do bw <- (fromIntegral . wa_border_width) `liftM` io (getWindowAttributes d w) + -- give all windows at least 1x1 pixels + let least x | x <= bw*2 = 1 + | otherwise = x - bw*2 io $ moveResizeWindow d w (rect_x r) (rect_y r) - (rect_width r - bw*2) (rect_height r - bw*2) + (least $ rect_width r) (least $ rect_height r) reveal w -- --------------------------------------------------------------------- |