mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-09 08:31:51 -07:00
comments only
This commit is contained in:
@@ -475,9 +475,18 @@ mouseResizeWindow :: Window -> X ()
|
|||||||
mouseResizeWindow w = withDisplay $ \d -> do
|
mouseResizeWindow w = withDisplay $ \d -> do
|
||||||
io $ raiseWindow d w
|
io $ raiseWindow d w
|
||||||
wa <- io $ getWindowAttributes d w
|
wa <- io $ getWindowAttributes d w
|
||||||
io $ warpPointer d none w 0 0 0 0 (fromIntegral (wa_width wa))
|
io $ warpPointer d none w 0 0 0 0 (fromIntegral (wa_width wa)) (fromIntegral (wa_height wa))
|
||||||
(fromIntegral (wa_height wa))
|
|
||||||
mouseDrag $ \(_, _, _, ex, ey, _, _, _, _, _) ->
|
mouseDrag $ \(_, _, _, ex, ey, _, _, _, _, _) ->
|
||||||
resizeWindow d w (fromIntegral (max 1 (ex - fromIntegral (wa_x wa))))
|
resizeWindow d w (fromIntegral (max 1 (ex - fromIntegral (wa_x wa))))
|
||||||
(fromIntegral (max 1 (ey - fromIntegral (wa_y wa))))
|
(fromIntegral (max 1 (ey - fromIntegral (wa_y wa))))
|
||||||
float w
|
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
|
||||||
|
Reference in New Issue
Block a user