[xmonad] Issue 462 in xmonad: Ewmh desktop handle event doesn't correctly handle _NET_WM_DESKTOP message type

Wirt Wolff wirtwolff at gmail.com
Mon Jul 18 07:10:24 CEST 2011


Excerpts from codesite-noreply's message of Sun Jul 17 21:45:00 -0600 2011:
> Updates:
> .... 
> Comment #1 on issue 462 by vogt.a... at gmail.com: Ewmh desktop handle event  
> doesn't correctly handle _NET_WM_DESKTOP message type
> http://code.google.com/p/xmonad/issues/detail?id=462
> 
> Sounds like a good idea. The following handleEventHook (based on the one in
> EwmhDesktops) should do that:
> 
> .... 
> ewmhCopyWindow :: Event -> X All
> ewmhCopyWindow ClientMessageEvent {
>                 ev_window = w,
>                 ev_message_type = mt,
>                 ev_data = 0xffffffff : _
>         } = withWindowSet $ \s -> do
>      a_cd <- getAtom "_NET_CURRENT_DESKTOP"
>      when (mt == a_cd) $ do
>          sort' <- getSortByIndex
>          let ws = map W.tag $ sort' $ W.workspaces s
>          windows $ foldr (.) id (map (copyWindow w) ws)
>      return (All True)
> ewmhCopyWindow _ = return (All True)
> ....
> This ewmhCopyWindow behaviour should probably be added to EwmhDesktops.
> 

One thing to note is copyWindow doesn't act as expected with more than
one screen. It is only able to map the copied window on one workspace.
This causes flickering focus problems with at least some driver/X
combinations. At its best it shows the copied window on the inactive
rather than the active workspace, resulting in a frustrating inability
to focus the copied window if that's needed.

I did a little searching for "pinned window" code in other window
managers, hoping for some clues as to how to better implement
copyWindow, but haven't found anything yet.

-- wmw



More information about the xmonad mailing list