Open GoogleCodeExporter opened 8 years ago
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.
Original comment by vogt.a...@gmail.com
on 18 Jul 2011 at 3:44
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.
Original comment by punitagr...@gmail.com
on 25 Jul 2011 at 2:13
[deleted comment]
This is still an issue in 0.10 (from darcs). It prevents the krunner from being
opened when using kde4.
Original comment by jesper.reenberg
on 10 Nov 2011 at 2:28
Original issue reported on code.google.com by
punitagr...@gmail.com
on 21 Jun 2011 at 4:34Attachments: