diff options
author | David Roundy <droundy@darcs.net> | 2007-09-26 21:16:56 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-09-26 21:16:56 +0200 |
commit | 1f4cc4074b963cc209a22fa6187ca68f799fc327 (patch) | |
tree | d1fc6ece0c96d6290256abaf461f16df80fbdbae /DragPane.hs | |
parent | af3e04cd037b737d2e9084cc778628b34e55fa1d (diff) | |
download | XMonadContrib-1f4cc4074b963cc209a22fa6187ca68f799fc327.tar.gz XMonadContrib-1f4cc4074b963cc209a22fa6187ca68f799fc327.tar.xz XMonadContrib-1f4cc4074b963cc209a22fa6187ca68f799fc327.zip |
make DragPane code a bit more compact.
darcs-hash:20070926191656-72aca-6a0aac4ba0240a04152c9f6b8cbe30bcb2de7f11.gz
Diffstat (limited to 'DragPane.hs')
-rw-r--r-- | DragPane.hs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/DragPane.hs b/DragPane.hs index 68f6dd8..b11d663 100644 --- a/DragPane.hs +++ b/DragPane.hs @@ -71,15 +71,12 @@ instance Message SetFrac handleMess :: DragPane Window -> SomeMessage -> X (Maybe (DragPane Window)) handleMess d@(DragPane mb@(Just (win,_,ident)) ty delta split) x - | Just e <- fromMessage x :: Maybe Event = do - handleEvent d e - return Nothing - | Just Hide <- fromMessage x = do - hideDragWin win - return $ Just (DragPane mb ty delta split) - | Just ReleaseResources <- fromMessage x = do - destroyDragWin win - return $ Just (DragPane Nothing ty delta split) + | Just e <- fromMessage x :: Maybe Event = do handleEvent d e + return Nothing + | Just Hide <- fromMessage x = do hideDragWin win + return $ Just (DragPane mb ty delta split) + | Just ReleaseResources <- fromMessage x = do destroyDragWin win + return $ Just (DragPane Nothing ty delta split) -- layout specific messages | Just Shrink <- fromMessage x = return $ Just (DragPane mb ty delta (split - delta)) | Just Expand <- fromMessage x = return $ Just (DragPane mb ty delta (split + delta)) |