java-swing-application-focus-patch.dpatch

Hello, Please find attached a patch for xmonad-contrib that implements appropriate focus-handling for Java swing applications when used in ~/.xmonad/xmonad.hs. As discussed in irc.freenode.net/#xmonad. -- Tony Morris http://tmorris.net/

This 1-patch bundle was just applied to http://code.haskell.org/XMonadContrib: 20110105032535 haskell@tmorris.net * Java swing application focus patch -- This message was brought to you by DarcsWatch http://darcswatch.nomeata.de/repo_http:__code.haskell.org_XMonadContrib.html...

On 01/05/2011 09:45 PM, darcswatch@nomeata.de wrote:
This 1-patch bundle was just applied to http://code.haskell.org/XMonadContrib:
20110105032535 haskell@tmorris.net * Java swing application focus patch
I just tried to compile this on Arch x64 via xmonad-contrib-darcs from the AUR and got this:
[ 34 of 212] Compiling XMonad.Hooks.ICCCMFocus ( XMonad/Hooks/ICCCMFocus.hs, dist/build/XMonad/Hooks/ICCCMFocus.o )
XMonad/Hooks/ICCCMFocus.hs:37:17: Not in scope: `atom_WM_TAKE_FOCUS' Aborting...
It was compiling successfully until now.

The same probleme here... have you fin dsomething to fix it?

Hello,
I mistakenly used an xmonad-core that defines and exports that missing
definition. Later today I will be able to fix the repo (with "darcs
rollback"), but in the meantime you can remove it using "darcs unpull"
in your copy of repository.
For reference, the incorrect patch is this one:
http://code.haskell.org/XMonadContrib/_darcs/patches/20110106033839-1499c-1c...
It might be worth considering moving that atom to the X11 library too.
Adam
On Thu, Jan 6, 2011 at 9:52 AM, ditow
The same probleme here... have you fin dsomething to fix it?
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

On 01/06/2011 10:59 AM, adam vogt wrote:
I mistakenly used an xmonad-core that defines and exports that missing definition. Later today I will be able to fix the repo (with "darcs rollback"), but in the meantime you can remove it using "darcs unpull" in your copy of repository.
For reference, the incorrect patch is this one: http://code.haskell.org/XMonadContrib/_darcs/patches/20110106033839-1499c-1c...
That's the patch to fix the problem, not rollback the commit, right? Because it doesn't match what I'm seeing in H.ICCCMFocus right now:
20 module XMonad.Hooks.ICCCMFocus 21 ( 22 takeFocusX 23 , takeTopFocus 24 ) where 25 26 import XMonad 27 import XMonad.Hooks.SetWMName 28 import qualified XMonad.StackSet as W 29 import Control.Monad 30 31 takeFocusX :: 32 Window 33 -> X () 34 takeFocusX w = 35 withWindowSet . const $ do 36 dpy <- asks display 37 wmtakef <- atom_WM_TAKE_FOCUS 38 wmprot <- atom_WM_PROTOCOLS 39 protocols <- io $ getWMProtocols dpy w 40 when (wmtakef `elem` protocols) $ 41 io . allocaXEvent $ \ev -> do 42 setEventType ev clientMessage 43 setClientMessageEvent ev w wmprot 32 wmtakef currentTime 44 sendEvent dpy w False noEventMask ev 45 46 -- | The value to add to your log hook configuration. 47 takeTopFocus :: 48 X () 49 takeTopFocus = 50 (withWindowSet $ maybe (setFocusX =<< asks theRoot) takeFocusX . W.peek) >> setWMName "LG3D"
The only place atom_WM_TAKE_FOCUS appears is at line 37. It's not present at lines 22 or 31, like in your patch.

* On Thursday, January 06 2011, Samir Unni wrote:
On 01/06/2011 10:59 AM, adam vogt wrote:
For reference, the incorrect patch is this one: http://code.haskell.org/XMonadContrib/_darcs/patches/20110106033839-1499c-1c...
That's the patch to fix the problem, not rollback the commit, right? Because it doesn't match what I'm seeing in H.ICCCMFocus right now:
Samir, That patch is the mistake. Lines starting with + are added, - are removed. If you pull now (ie. run makepkg again), H.ICCCMFocus has been corrected. Sorry about the inconvenience. -- Adam

On 01/06/2011 03:12 PM, Adam Vogt wrote:
That patch is the mistake. Lines starting with + are added, - are removed. If you pull now (ie. run makepkg again), H.ICCCMFocus has been corrected.
Great, thanks a lot! My MATLAB Command Window focus problems have been fixed.

Have you tried getting the latest X11 bindings from darcs? I don't
know if that will help (I can't test on this machine), but it seems
like it's worth a shot.
~d
Quoting Samir Unni
On 01/05/2011 09:45 PM, darcswatch@nomeata.de wrote:
This 1-patch bundle was just applied to http://code.haskell.org/XMonadContrib:
20110105032535 haskell@tmorris.net * Java swing application focus patch
I just tried to compile this on Arch x64 via xmonad-contrib-darcs from the AUR and got this:
[ 34 of 212] Compiling XMonad.Hooks.ICCCMFocus ( XMonad/Hooks/ICCCMFocus.hs, dist/build/XMonad/Hooks/ICCCMFocus.o )
XMonad/Hooks/ICCCMFocus.hs:37:17: Not in scope: `atom_WM_TAKE_FOCUS' Aborting...
It was compiling successfully until now.
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
participants (7)
-
adam vogt
-
Adam Vogt
-
darcswatch@nomeata.de
-
ditow
-
Samir Unni
-
Tony Morris
-
wagnerdm@seas.upenn.edu