diff options
-rw-r--r-- | LayoutModifier.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LayoutModifier.hs b/LayoutModifier.hs index 8785c5f..1320fac 100644 --- a/LayoutModifier.hs +++ b/LayoutModifier.hs @@ -20,15 +20,17 @@ module XMonadContrib.LayoutModifier ( import Graphics.X11.Xlib ( Rectangle ) import XMonad import StackSet ( Stack ) -import Operations ( LayoutMessages(Hide) ) +import Operations ( LayoutMessages(Hide, ReleaseResources) ) -- $usage -- Use LayoutHelpers to help write easy Layouts. class (Show (m a), Read (m a)) => LayoutModifier m a where modifyModify :: m a -> SomeMessage -> X (Maybe (m a)) - modifyModify m mess | Just Hide <- fromMessage mess = do unhook m; return Nothing + modifyModify m mess | Just Hide <- fromMessage mess = doUnhook + | Just ReleaseResources <- fromMessage mess = doUnhook | otherwise = return Nothing + where doUnhook = do unhook m; return Nothing redoLayout :: m a -> Rectangle -> Stack a -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (m a)) redoLayout m _ _ wrs = do hook m; return (wrs, Nothing) |