summaryrefslogtreecommitdiffstats
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
commitf6423d270467d640c4b38c8803fb67fec8728180 (patch)
tree8be187fd1d8433a2e41dd09b8f1e2dbcdc21bd21 /Operations.hs
parente1ac27adceb2e92c961a43893db4d8be3afbcc4d (diff)
downloadmetatile-f6423d270467d640c4b38c8803fb67fec8728180.tar
metatile-f6423d270467d640c4b38c8803fb67fec8728180.zip
apply size hints to floating windows
darcs-hash:20070604192943-06a25-571e4d20a5cb05c292e071295586d7e024cf89ec
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
--