You are not logged in.

#1 2015-06-19 06:41:10

krork
Member
Registered: 2013-06-08
Posts: 29

XMonad won't let Opera accept keystrokes on Focus

Hi,
I've been trying out XMonad over the past few days, and I love it.

There's just one thing that's driving me crazy: When I change focus to Opera, I can't use my keyboard until I click on the Opera tile with my mouse.

It's a huge productivity drain, and I can't seem to get it to work. I've tried focusFollowsMouse = true/false and updatePointer to move the cursor to the focused window, but no luck, I still have to click it.

It does seem to be Opera-specific, that is, I haven't seen the problem in any other application.

Does anyone have any ideas? I would love to continue using XMonad, but this is a gamekiller.

Offline

#2 2015-06-19 08:02:55

krork
Member
Registered: 2013-06-08
Posts: 29

Re: XMonad won't let Opera accept keystrokes on Focus

I was unsure whether I should even post this thread here since the problem might be due to Opera, so I gave up a bit on the issue and tried spectrwm as an alternative tiling manager, where everything works fine so far. It was inspired by XMonad, so even the keybindings are very similar to XMonad. So there you go.

Offline

#3 2015-06-19 10:59:45

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: XMonad won't let Opera accept keystrokes on Focus

There is this bug report that has been open for over 6 years, and mostly affects Java applications.
In particular, there seems to be an issue with Xmonad regarding the behaviour related to X11's WM_TAKE_FOCUS atom as specified by the ICCCM standard. I don't use Xmonad nor Opera, but I can imagine that Opera is using that particular atom, too, and it's thus causing the same issues.

Maybe you can try launching some Java applications to check if you encounter the same problem. Then maybe see if the patch(es) appearing in the bug report fix them.
Apparently there are some undesirable side effects, which is why the patch hasn't made it into the Xmonad core yet.

This may not be of much help for solving your problem, but I thought you may want to know that there actually is an issue with Xmonad related to focus handling.

Last edited by ayekat (2015-06-24 13:54:28)


pkgs │ hacks │ cfg │ blag

Offline

#4 2015-06-20 17:18:12

krork
Member
Registered: 2013-06-08
Posts: 29

Re: XMonad won't let Opera accept keystrokes on Focus

Why yes, this is exactly the kind of thing I wanted to know. Thank you very much for the searching! That does make it look like a different window manager will be the answer, though.

Offline

#5 2015-06-20 18:07:54

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: XMonad won't let Opera accept keystrokes on Focus

I don't normally use Opera (nor any Java GUI apps), but just did a quick test and I don't see any issues. I am using xmonad-contrib's XMonad.Hooks.EwmhDesktops; that might have some influence (haven't tried without it yet, but I seem to rember this fixed an issue with dialogs in Open-/Libreoffice). Another thing you could try is XMonad.Hooks.ICCCMFocus (based on the patch in that bug report).

Offline

#6 2015-06-21 00:48:53

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: XMonad won't let Opera accept keystrokes on Focus

The EwmhDesktops works wonders on alot of issues.  I had problems in the past with kodi/xmbc not behaving, and it was fixed by the ewmhdesktops.  So this may make opera and xmonad behave like they should.


Knute

Offline

#7 2015-06-24 13:33:49

krork
Member
Registered: 2013-06-08
Posts: 29

Re: XMonad won't let Opera accept keystrokes on Focus

Knute, Emwh desktops did indeed solve the problem! Just adding this to my xmonad.hs

 
    import XMonad.Hooks.EwmhDesktops

    main = xmonad $ ewmh defaultConfig
        { 
         handleEventHook =
              handleEventHook defaultConfig <+> fullscreenEventHook

}

did the trick.

I have not yet gotten around to trying the thing mentioned in the old bug report, because it seems like a hassle. This solution here is worth mentioning though. Thanks you guys. Now I might even finally get around to doing something in Haskell smile)

Offline

#8 2015-06-24 13:46:27

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: XMonad won't let Opera accept keystrokes on Focus

Glad that took care of it.

Since this is solved, you may want to edit your first post and prepend it with [Solved] or something similar.

Again, glad we could get you over this hurdle.  Have a good one!  smile


Knute

Offline

Board footer

Powered by FluxBB