[xmonad] Window(s) overlaps status bar after xmonad is restarted
Dunric
dunric29a at gmail.com
Mon Aug 15 00:20:48 CEST 2011
> * On Sunday, August 14 2011, Norbert Zeh wrote:
>
>> Dunric [2011.08.14 1931 +0200]:
>>> Hi,
>>>
>>> any advice how to prevent windows to overlap statusbar after xmonad
>>> is (re)started ?
>> As far as I know, this is a known issue and a minor one at that.
>> Actually simply switching focus fixes the issue. It would be nice to
>> understand why this happens and find a fix for it, though.
> Hi,
>
> I believe the issue is addressed by XMonad.Hooks.ManageDocks.docksEventHook
> added by this patch (which unfortunately isn't an xmonad-contrib on
> hackage):
>
> Tue Jul 6 14:58:34 EDT 2010 Tomas Janousek
> * X.H.ManageDocks: event hook to refresh on new docks
>
> --
> Adam
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
Good point. I've found Tomas Janousek's diff and merged it into my
xmonad.hs config:
-- Whenever a new dock appears, refresh the layout immediately to avoid the
-- new dock.
docksEventHook :: Event -> X All
docksEventHook (MapNotifyEvent {ev_window = w}) = do
whenX ((not `fmap` (isClient w)) <&&> runQuery checkDock w) refresh
return (All True)
docksEventHook _ = return (All True)
-- custom xmonad config
myConfig = defaultConfig
{
...
-- custom event hook to refresh layout if new dock does appear
, handleEventHook = docksEventHook
...
}
Now it does work flawlessly, issue is gone.
I still find it rather as a hack than a bugfix but better then nothing :-)
Haskell is sweet ...
Take care
David
More information about the xmonad
mailing list