aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
authorJens Petersen <juhp@community.haskell.org>2012-03-14 07:47:03 +0100
committerJens Petersen <juhp@community.haskell.org>2012-03-14 07:47:03 +0100
commit56f2989ec3f9f23d6f21167a4cada404374e1899 (patch)
tree541ee518960b0b5df301a9368c52bf37c36b4c51 /XMonad/Layout
parent7ba0479c51e047296753fe5c6987c13dc848cd81 (diff)
downloadXMonadContrib-56f2989ec3f9f23d6f21167a4cada404374e1899.tar.gz
XMonadContrib-56f2989ec3f9f23d6f21167a4cada404374e1899.tar.xz
XMonadContrib-56f2989ec3f9f23d6f21167a4cada404374e1899.zip
narrower BorderResize rectangles placed within border edges
Ignore-this: 3a43bbdb7f2317d702edafb231f58802 Change the border resize rectangles to be narrower and only extend inside the window not outside. Most window managers just seem to use the border decoration area for starting resizes which is often just 1 pixel wide but as a compromise the width is now 2 pixels (before it was 10!). The rectangles are now placed symmetrically within the border and window. This seems to work ok with PositionStoreFloat for the Bluetile config. darcs-hash:20120314064703-2376b-7c0f261c543d9855567e5187d224eb04a0c115bd.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r--XMonad/Layout/BorderResize.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/XMonad/Layout/BorderResize.hs b/XMonad/Layout/BorderResize.hs
index 6cc020a..d67d022 100644
--- a/XMonad/Layout/BorderResize.hs
+++ b/XMonad/Layout/BorderResize.hs
@@ -59,10 +59,8 @@ type RectWithBorders = (Rectangle, [BorderInfo])
data BorderResize a = BR (M.Map Window RectWithBorders) deriving (Show, Read)
-brBorderOffset :: Position
-brBorderOffset = 5
brBorderSize :: Dimension
-brBorderSize = 10
+brBorderSize = 2
borderResize :: l a -> ModifiedLayout BorderResize l a
borderResize = ModifiedLayout (BR M.empty)
@@ -147,10 +145,10 @@ createBorderLookupTable wrsLastTime = concat $ map processSingleEntry $ M.toList
prepareBorders :: Rectangle -> [BorderBlueprint]
prepareBorders (Rectangle x y wh ht) =
- [((Rectangle (x + fi wh - brBorderOffset) y brBorderSize ht), xC_right_side , RightSideBorder),
- ((Rectangle (x - brBorderOffset) y brBorderSize ht) , xC_left_side , LeftSideBorder),
- ((Rectangle x (y - brBorderOffset) wh brBorderSize) , xC_top_side , TopSideBorder),
- ((Rectangle x (y + fi ht - brBorderOffset) wh brBorderSize), xC_bottom_side, BottomSideBorder)
+ [((Rectangle (x + fi wh - fi brBorderSize) y brBorderSize ht), xC_right_side , RightSideBorder),
+ ((Rectangle x y brBorderSize ht) , xC_left_side , LeftSideBorder),
+ ((Rectangle x y wh brBorderSize) , xC_top_side , TopSideBorder),
+ ((Rectangle x (y + fi ht - fi brBorderSize) wh brBorderSize), xC_bottom_side, BottomSideBorder)
]
handleResize :: [(Window, (BorderType, Window, Rectangle))] -> Event -> X ()