diff options
author | Martin Perner <martin@perner.cc> | 2011-08-31 10:40:47 +0200 |
---|---|---|
committer | Martin Perner <martin@perner.cc> | 2011-08-31 10:40:47 +0200 |
commit | e8f3d5f0e6898e0b48d709267d83b2d4c8c2869f (patch) | |
tree | 6996e37611116e081c482eeadf80ff8c2fabfa0b | |
parent | bba4b08bb0056d44c3d1535e08ed0a32ed060f1f (diff) | |
download | xmobar-e8f3d5f0e6898e0b48d709267d83b2d4c8c2869f.tar.gz xmobar-e8f3d5f0e6898e0b48d709267d83b2d4c8c2869f.tar.bz2 |
Update on Screen change works
But I'm not sure if something is broken now...
-rw-r--r-- | src/Xmobar.hs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs index f0c00cb..462de14 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -101,20 +101,12 @@ eventLoop xc@(XConf d _ w fs c) vs = block $ do go tv ct -- event hanlder - handle _ ct (ConfigureEvent {ev_window = win}) = do - rootw <- rootWindow d (defaultScreen d) - putStrLn "Configure" - when (win == rootw) $ block $ do - killThread ct - destroyWindow d w - (r',w') <- createWin d fs c - eventLoop (XConf d r' w' fs c) vs + handle _ _ (ConfigureEvent {}) = return () handle tvar _ (ExposeEvent {}) = runX xc (updateWin tvar) -- this catches the RRScreenChangeNotify handle _ ct _ = block $ do - putStrLn "ScreenChange" killThread ct destroyWindow d w (r',w') <- createWin d fs c @@ -147,9 +139,8 @@ createWin d fs c = do let ht = as + ds + 4 (r,o) = setPosition (position c) srs (fi ht) win <- newWindow d (defaultScreenOfDisplay d) rootw r o - selectInput d win (exposureMask .|. structureNotifyMask) -- RRScreenChangeNotifyMask has the same value as keyPressMask - xrrSelectInput d rootw (keyPressMask) + xrrSelectInput d rootw keyPressMask setProperties r c d win srs when (lowerOnStart c) (lowerWindow d win) mapWindow d win |