diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-06-03 09:15:56 +0200 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-06-03 09:15:56 +0200 |
commit | 05525798cb71fcb931b2b991b57ff06e4e533ec8 (patch) | |
tree | 304085cdc5a148e85cc919c6238f44c432c13914 | |
parent | 266e51f362a63008fcae9a86e230d956e7eac4cf (diff) | |
download | xmonad-05525798cb71fcb931b2b991b57ff06e4e533ec8.tar.gz xmonad-05525798cb71fcb931b2b991b57ff06e4e533ec8.tar.xz xmonad-05525798cb71fcb931b2b991b57ff06e4e533ec8.zip |
comments only
darcs-hash:20070603071556-9c5c1-244aeb0d684f78ae0d3495547064a1203cd36762.gz
Diffstat (limited to '')
-rw-r--r-- | Operations.hs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Operations.hs b/Operations.hs index 42c3b84..81df02a 100644 --- a/Operations.hs +++ b/Operations.hs @@ -467,17 +467,26 @@ mouseMoveWindow w = withDisplay $ \d -> do wa <- io $ getWindowAttributes d w (_, _, _, ox, oy, _, _, _) <- io $ queryPointer d w mouseDrag $ \(_, _, _, ex, ey, _, _, _, _, _) -> - moveWindow d w (fromIntegral (fromIntegral (wa_x wa) + (ex - ox))) - (fromIntegral (fromIntegral (wa_y wa) + (ey - oy))) + moveWindow d w (fromIntegral (fromIntegral (wa_x wa) + (ex - ox))) + (fromIntegral (fromIntegral (wa_y wa) + (ey - oy))) float w mouseResizeWindow :: Window -> X () mouseResizeWindow w = withDisplay $ \d -> do io $ raiseWindow d w wa <- io $ getWindowAttributes d w - io $ warpPointer d none w 0 0 0 0 (fromIntegral (wa_width wa)) - (fromIntegral (wa_height wa)) + 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)))) float w +-- + +-- generic handler, but too complex: +-- +-- mouseModifyWindow f g w = withDisplay $ \d -> do +-- io $ raiseWindow d w +-- wa <- io $ getWindowAttributes d w +-- x <- f d w wa +-- mouseDrag $ \(_,_,_,ex,ey,_,_,_,_,_) -> g x ex ey d w wa +-- float w |