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:
@@ -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
|
||||
|
Reference in New Issue
Block a user