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

codesite-noreply at google.com codesite-noreply at google.com
Mon Jul 25 16:14:53 CEST 2011


Comment #3 on issue 462 by punitagr... 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

Hi,

Thanks for the code sample. I tried it out but it didn't fix the issue I  
encountered. I played with the ewmhCopyWindow function and the following  
version sort of makes things better -

diff -rN old-XMonadContrib/XMonad/Hooks/EwmhDesktops.hs  
new-XMonadContrib/XMonad/Hooks/EwmhDesktops.hs
34a35
> import XMonad.Actions.CopyWindow
54c55
<            , handleEventHook = handleEventHook c +++ ewmhDesktopsEventHook
---
>             , handleEventHook = handleEventHook c +++  
> ewmhDesktopsEventHook `mappend` ewmhCopyWindow
145a147,148
>                   {- else if n == 0xffffffff then
>                         windows $ W.shiftWin (W.currentTag s) w -}
148a152
>                 trace $ "focus"++show w
157a162,176

> ewmhCopyWindow :: Event -> X All
> ewmhCopyWindow ClientMessageEvent {
>                 ev_window = w,
>                 ev_message_type = mt,
>                 ev_data = 0xffffffff : _
>         } = withWindowSet $ \s -> do
>      a_d <- getAtom "_NET_WM_DESKTOP"
>      when (mt == a_d) $ do
>          sort' <- getSortByIndex
>          let ws = map W.tag $ sort' $ W.workspaces s
>          windows $ foldr (.) id (map (copyWindow w) ws)
>          trace $ show w
>      return (All True)
> ewmhCopyWindow _ = return (All True)

On further searching I think what I am really after are the changes that  
come in with http://code.google.com/p/xmonad/issues/detail?id=430. Now if  
only I can understand the code and make it work with my setup.




More information about the xmonad mailing list