1
0
mirror of https://github.com/xmonad/xmonad-contrib.git synced 2025-08-13 03:05:57 -07:00

Use existing connection in X.H.DynamicBars

Adapted from patch attributed to geekosaur
(https://code.google.com/p/xmonad/issues/detail?id=538).
This commit is contained in:
Dmitri Iouchtchenko
2015-08-24 01:56:46 -04:00
parent 05f3eb17f5
commit 42a69bfa98

@@ -77,10 +77,9 @@ type DynamicStatusBarCleanup = IO ()
dynStatusBarStartup :: DynamicStatusBar -> DynamicStatusBarCleanup -> X ()
dynStatusBarStartup sb cleanup = do
liftIO $ do
dpy <- openDisplay ""
xrrSelectInput dpy (defaultRootWindow dpy) rrScreenChangeNotifyMask
closeDisplay dpy
dpy <- asks display
root <- asks theRoot
io $ xrrSelectInput dpy root rrScreenChangeNotifyMask
updateStatusBars sb cleanup
dynStatusBarEventHook :: DynamicStatusBar -> DynamicStatusBarCleanup -> Event -> X All