mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 20:51:52 -07:00
make FlexibleResize use new mouseDrag properly.
This commit is contained in:
@@ -45,12 +45,13 @@ mouseResizeWindow w = whenX (isClient w) $ withDisplay $ \d -> do
|
|||||||
(cx, fx, gx) = mkSel west width pos_x
|
(cx, fx, gx) = mkSel west width pos_x
|
||||||
(cy, fy, gy) = mkSel north height pos_y
|
(cy, fy, gy) = mkSel north height pos_y
|
||||||
io $ warpPointer d none w 0 0 0 0 cx cy
|
io $ warpPointer d none w 0 0 0 0 cx cy
|
||||||
mouseDrag $ \(_, _, _, ex, ey, _, _, _, _, _) -> do
|
mouseDrag (\ex ey -> do
|
||||||
wa' <- getWindowAttributes d w
|
wa' <- io $ getWindowAttributes d w
|
||||||
let [px, py] = map (fromIntegral . ($ wa')) [wa_x, wa_y]
|
let [px, py] = map (fromIntegral . ($ wa')) [wa_x, wa_y]
|
||||||
moveResizeWindow d w (fromIntegral $ fx px ex) (fromIntegral $ fy py ey)
|
io $ moveResizeWindow d w (fromIntegral $ fx px (fromIntegral ex))
|
||||||
`uncurry` applySizeHints sh (gx ex, gy ey)
|
(fromIntegral $ fy py (fromIntegral ey))
|
||||||
float w
|
`uncurry` applySizeHints sh (gx $ fromIntegral ex, gy $ fromIntegral ey))
|
||||||
|
(float w)
|
||||||
where
|
where
|
||||||
firstHalf :: CInt -> Position -> Bool
|
firstHalf :: CInt -> Position -> Bool
|
||||||
firstHalf a b = fromIntegral a * 2 <= b
|
firstHalf a b = fromIntegral a * 2 <= b
|
||||||
|
Reference in New Issue
Block a user