aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorPeter De Wachter <pdewacht@gmail.com>2007-06-04 21:29:43 +0200
committerPeter De Wachter <pdewacht@gmail.com>2007-06-04 21:29:43 +0200
commit5adb2879cb0944e6e5fae4e33c4839d0d428604e (patch)
tree8be187fd1d8433a2e41dd09b8f1e2dbcdc21bd21 /Operations.hs
parent78fff7fbb83f34b047c368fced0a5eb2efbfb6d1 (diff)
downloadxmonad-5adb2879cb0944e6e5fae4e33c4839d0d428604e.tar.gz
xmonad-5adb2879cb0944e6e5fae4e33c4839d0d428604e.tar.xz
xmonad-5adb2879cb0944e6e5fae4e33c4839d0d428604e.zip
apply size hints to floating windows
darcs-hash:20070604192943-06a25-571e4d20a5cb05c292e071295586d7e024cf89ec.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Operations.hs b/Operations.hs
index d35c20d..dd3441f 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -467,10 +467,12 @@ mouseResizeWindow :: Window -> X ()
mouseResizeWindow w = withDisplay $ \d -> do
io $ raiseWindow d w
wa <- io $ getWindowAttributes d w
+ sh <- io $ getWMNormalHints d w
io $ warpPointer d none w 0 0 0 0 (fromIntegral (wa_width wa)) (fromIntegral (wa_height wa))
mouseDrag $ \(_, _, _, ex, ey, _, _, _, _, _) ->
- resizeWindow d w (fromIntegral (max 1 (ex - fromIntegral (wa_x wa))))
- (fromIntegral (max 1 (ey - fromIntegral (wa_y wa))))
+ resizeWindow d w `uncurry`
+ applySizeHints sh ((fromIntegral (max 1 (ex - fromIntegral (wa_x wa)))),
+ (fromIntegral (max 1 (ey - fromIntegral (wa_y wa)))))
float w
--