From f6423d270467d640c4b38c8803fb67fec8728180 Mon Sep 17 00:00:00 2001 From: Peter De Wachter Date: Mon, 4 Jun 2007 21:29:43 +0200 Subject: apply size hints to floating windows darcs-hash:20070604192943-06a25-571e4d20a5cb05c292e071295586d7e024cf89ec --- Operations.hs | 6 ++++-- 1 file 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 -- -- cgit v1.2.3