summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r--src/Xmobar.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index 1b58352..a65a236 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -140,7 +140,18 @@ eventLoop tv xc@(XConf d _ w fs cfg) signal = do
ncfg <- updateConfigPosition cfg
reposWindow ncfg
+ Hide -> hide
+ Reveal -> reveal
+ Toggle -> toggle
+
where
+ hide = hideWindow d w >> eventLoop tv xc signal
+ reveal = do
+ r' <- repositionWin d w fs cfg
+ showWindow d w
+ eventLoop tv (XConf d r' w fs cfg) signal
+ toggle = isMapped d w >>= \b -> if b then hide else reveal
+
reposWindow rcfg = do
r' <- repositionWin d w fs rcfg
eventLoop tv (XConf d r' w fs rcfg) signal