[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 18 05:45:00 CEST 2011


Updates:
	Owner: vogt.a... at gmail.com
	Cc: nome... at gmail.com
	Labels: Component-Contrib

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:

import Control.Monad; import Data.Monoid; import XMonad; import qualified  
XMonad.StackSet as W
import XMonad.Actions.CopyWindow; import XMonad.Util.WorkspaceCompare

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)


Then just add where you previously had:

     handleEventHook = ewmhDesktopsEventHook


     handleEventHook = ewmhDesktopsEventHook `mappend` ewmhCopyWindow


This ewmhCopyWindow behaviour should probably be added to EwmhDesktops.





More information about the xmonad mailing list