mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-02 05:01:53 -07:00
Make pointWithin a top-level binding
This commit is contained in:
@@ -423,11 +423,14 @@ floatLocation w = withDisplay $ \d -> do
|
|||||||
|
|
||||||
return (W.screen $ sc, rr)
|
return (W.screen $ sc, rr)
|
||||||
where fi x = fromIntegral x
|
where fi x = fromIntegral x
|
||||||
pointWithin :: Integer -> Integer -> Rectangle -> Bool
|
|
||||||
pointWithin x y r = x >= fi (rect_x r) &&
|
-- | 'pointWithin x y r' returns 'True' if the '(x, y)' co-ordinate is within
|
||||||
x < fi (rect_x r) + fi (rect_width r) &&
|
-- the 'Rectangle'.
|
||||||
y >= fi (rect_y r) &&
|
pointWithin :: Position -> Position -> Rectangle -> Bool
|
||||||
y < fi (rect_y r) + fi (rect_height r)
|
pointWithin x y r = x >= rect_x r &&
|
||||||
|
x < rect_x r + fromIntegral (rect_width r) &&
|
||||||
|
y >= rect_y r &&
|
||||||
|
y < rect_y r + fromIntegral (rect_height r)
|
||||||
|
|
||||||
-- | Make a tiled window floating, using its suggested rectangle
|
-- | Make a tiled window floating, using its suggested rectangle
|
||||||
float :: Window -> X ()
|
float :: Window -> X ()
|
||||||
|
Reference in New Issue
Block a user