mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
Fix caching issues in ManageDocks
Commitsd638dc8b
anda5e87e38
introduced a per-AvoidStruts-instance strut cache that a) didn't get initialized at startup, b) didn't get reinitialized after layout reset and c) didn't get updates if it wasn't the active layout, for example when layoutHook = avoidStruts tall ||| avoidStruts (mirror tall) a) + b) could be fixed by using the docksStartupHook introduced in28e9f8bc
, although this wasn't documented and having to call docksStartupHook after setLayout is far from obvious. By moving the strut cache from AvoidStruts instances to a global state, b) and c) are fixed. One still has to invoke the docksStartupHook for a), and this will be addressed in the next commit.
This commit is contained in:
@@ -106,8 +106,8 @@ handleScreenCrossing w decoWin = withDisplay $ \d -> do
|
||||
{-- somewhat ugly hack to get proper ScreenRect,
|
||||
creates unwanted inter-dependencies
|
||||
TODO: get ScreenRects in a proper way --}
|
||||
oldScreenRect' <- fmap ($ oldScreenRect) (calcGapForAll $ S.fromList [minBound .. maxBound])
|
||||
newScreenRect' <- fmap ($ newScreenRect) (calcGapForAll $ S.fromList [minBound .. maxBound])
|
||||
oldScreenRect' <- fmap ($ oldScreenRect) (calcGap $ S.fromList [minBound .. maxBound])
|
||||
newScreenRect' <- fmap ($ newScreenRect) (calcGap $ S.fromList [minBound .. maxBound])
|
||||
wa <- io $ getWindowAttributes d decoWin
|
||||
modifyPosStore (\ps ->
|
||||
posStoreMove ps w (fi $ wa_x wa) (fi $ wa_y wa)
|
||||
|
Reference in New Issue
Block a user