Manage struts even when _NET_WM_WINDOW_TYPE isn't a dock

Relates to #21
This commit is contained in:
Peter Jones 2017-02-07 15:58:55 -07:00
parent 4f3020313d
commit cd96de5378
No known key found for this signature in database
GPG Key ID: 9DAFAA8D01941E49

View File

@ -140,12 +140,11 @@ docksEventHook (MapNotifyEvent { ev_window = w }) = do
return (All True) return (All True)
docksEventHook (PropertyEvent { ev_window = w docksEventHook (PropertyEvent { ev_window = w
, ev_atom = a }) = do , ev_atom = a }) = do
whenX (runQuery checkDock w) $ do nws <- getAtom "_NET_WM_STRUT"
nws <- getAtom "_NET_WM_STRUT" nwsp <- getAtom "_NET_WM_STRUT_PARTIAL"
nwsp <- getAtom "_NET_WM_STRUT_PARTIAL" when (a == nws || a == nwsp) $ do
when (a == nws || a == nwsp) $ do strut <- getStrut w
strut <- getStrut w whenX (updateStrutCache w strut) refreshDocks
whenX (updateStrutCache w strut) refreshDocks
return (All True) return (All True)
docksEventHook (DestroyWindowEvent {ev_window = w}) = do docksEventHook (DestroyWindowEvent {ev_window = w}) = do
whenX (deleteFromStructCache w) refreshDocks whenX (deleteFromStructCache w) refreshDocks