mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-29 10:23:47 -07:00
WindowArranger: add a SetGeometry message - needed to enable mouseDrag
This commit is contained in:
@@ -90,6 +90,7 @@ data WindowArrangerMsg = DeArrange
|
|||||||
| MoveRight Int
|
| MoveRight Int
|
||||||
| MoveUp Int
|
| MoveUp Int
|
||||||
| MoveDown Int
|
| MoveDown Int
|
||||||
|
| SetGeometry Rectangle
|
||||||
deriving ( Typeable )
|
deriving ( Typeable )
|
||||||
instance Message WindowArrangerMsg
|
instance Message WindowArrangerMsg
|
||||||
|
|
||||||
@@ -134,6 +135,9 @@ instance (Show a, Read a, Eq a) => LayoutModifier WindowArranger a where
|
|||||||
fa = fromAWR wr
|
fa = fromAWR wr
|
||||||
chk x y = fi $ max 1 (fi x - y)
|
chk x y = fi $ max 1 (fi x - y)
|
||||||
|
|
||||||
|
pureMess (WA t b (wr:wrs)) m
|
||||||
|
| Just (SetGeometry r) <- fromMessage m, (w,_) <- fromAWR wr = Just . WA t b $ AWR (w,r):wrs
|
||||||
|
|
||||||
pureMess (WA _ b l) m
|
pureMess (WA _ b l) m
|
||||||
| Just DeArrange <- fromMessage m = Just $ WA False b l
|
| Just DeArrange <- fromMessage m = Just $ WA False b l
|
||||||
| Just Arrange <- fromMessage m = Just $ WA True b l
|
| Just Arrange <- fromMessage m = Just $ WA True b l
|
||||||
|
Reference in New Issue
Block a user