diff options
author | Martin Perner <martin@perner.cc> | 2011-08-31 13:39:01 +0200 |
---|---|---|
committer | Martin Perner <martin@perner.cc> | 2011-08-31 13:39:01 +0200 |
commit | 4fe99635e87c4f2262a27bf91c1ab6c7e3ee0988 (patch) | |
tree | 8471221ba858fb805f0619b158cf5c13e8e1b030 /src/Main.hs | |
parent | e8f3d5f0e6898e0b48d709267d83b2d4c8c2869f (diff) | |
download | xmobar-4fe99635e87c4f2262a27bf91c1ab6c7e3ee0988.tar.gz xmobar-4fe99635e87c4f2262a27bf91c1ab6c7e3ee0988.tar.bz2 |
Working version
The last commit removed the exposure event which turned out to be a big
problem.
Although the bug still exists that not all xrandr events are received
when normal events are enabled.
To work around this problem a second display is created on which only
the xrandr events are enabled.
On an exposure event the eventqueue for this display is processed.
The results are very good, in the worst case an exposure event must be
triggered by the user on xmobar to update its position.
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs index 18e05e2..941a844 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -42,6 +42,7 @@ import Control.Monad (unless) main :: IO () main = do d <- openDisplay "" + d' <- openDisplay "" args <- getArgs (o,file) <- getOpts args (c,defaultings) <- case file of @@ -60,7 +61,8 @@ main = do cls <- mapM (parseTemplate conf) (splitTemplate conf) vars <- mapM (mapM startCommand) cls (r,w) <- createWin d fs conf - eventLoop (XConf d r w fs conf) vars + _ <- enableXRandrEventListen d' + eventLoop (XConf d d' r w fs conf) vars -- | Splits the template in its parts splitTemplate :: Config -> [String] |