Registered Member
|
I've recently noticed a bug in KDE and/or Firefox, in the last few weeks. I have three windows in Firefox open that I can alt-tab between. However, sometimes when I type, keystrokes are sent to a background window. For example, if I press `ctrl+w` to close a tab, a tab in one of the background window closes. Even if I click (again) on the foreground window, keystrokes are sent to a background window.
At least on one occasion I can somewhat fix it. Let's call the windows [a], [b] and [c]. [a] is foreground and keystrokes are sent to [b]. Alt-tabbing between [a] and [b] does nothing. However, if I switch to [c], then back to [a], keystrokes are sent correctly. What's odd is that if I move to another program and then back, this problem will occur again (sometimes). This might also be relevent… I've also noticed Firefox is not focusing as it used to. In the past, If I open a link from RSSOwl, Firefox would be brought to the foreground. This no longer happens. Firefox remains in the background, and the window doesn't call for attention. I have focus-stealing prevention set to "low", but this also occurs if it's turned off. (And this setting has not changed recently anyway.) I guess I should file a bug, but I wanted to get an idea of any fix in the meantime, and also what to file the bug against.
Last edited by sparhawk on Wed Nov 06, 2013 11:15 am, edited 3 times in total.
|
KDE Developer
|
Sounds like a Firefox issue to me. Firefox has quite a lot issues with X as they more or less have their own toolkit instead of going with default ones.
|
|
Notice that the stacking ("foreground") is not related to activation state or input focus.
Esp. clients are permitted to juggle around the stacking between their own windows as much as they want. Alt+Tab should however pass the input focus to the window as long as it accepts it ("xwininfo -wm | grep -i focus") Next thing is that the client process can perform the input event handling "as it wants", so if all three windows (or esp. "a" and "b") run in the same process, FF could easily receive input on window "a" but process it as if it had occured on window "b". To figure this: 1. obtain the WId of the window that should receive the keystrokes. (run "xwininfo | grep -i 'window id'" and look for the hex number like 0x123456) 2. run "xev -event keyboard -id 0x123456" where "0x123456" should be the actual WId from (1) 3. ensure you get ouput from this while the window works as expected. 4. watch for the output when the window starts to misbehave. If there's still output, the bug is at FF. If not, check whether that window actually still accepts the input focus. |
Registered Member
|
Thanks luebking, great instructions.
However, this didn't work, giving me a usage error. I can't find any reference to -event in the man page. |
|
|
Registered Member
|
Ok, so keystrokes *are* passed to the "broken" window from running
Then, when the bug occurred, I tried
When the non-responsive window was in the front, xev showed it still registering keystrokes. I also tried xev for the background window that was acting on the keystrokes. No keystrokes were registering from xev. I presume this means that the bug is in Firefox? Where do you think it's best to file this bug? I'm using Kubuntu, so I guess either Ubuntu or Mozilla directly? Thanks for you help. |
|
Yes, is Firefox issue then.
Unless you obtained the version directly from Mozialla, you should ask on your distro first (in case they've patched FF or use a for like iceweasel) and have them (ask you to) escalate the issue to Mozilla. |
Registered Member
|
Hmm, it looks like a recent upgrade fixed it for me.
I guess it was firefox:amd64 19.0+build1-0ubuntu0.12.10.2, although the changelog doesn't mention anything about my bug. I wonder if it's possible that my installation was corrupt, and the upgrade fixed it by reinstalling Firefox? Thanks again for your help. EDIT: I should be more specific. I mean that I haven't noticed keystrokes being sent to background windows. This was previously an intermittent problem, but RSSOwl is now pushing Firefox to the foreground all the time now, so I assume that both parts of this single bug have been solved. |
|
No idea but this sounds as if FF manages the active window internally (ie. attempted to activate one the other window, failed, didn't notice and thus acted "as if" it had been successfully activated)
Activation could have failed because - it wasn't actually performed - KWin believed the window could not accept focus (either by client hint or rule, though you ruled out the client hint) - FF didn't sufficiently (for KWin's opinion) hint that both FF windows are siblings. Either way it would have been a FF bug - there's no guarantee the activation request is granted by the WM, so requesting to be active and assuming to be afterwards is simply wrong (the window gets an event when it's actually activated - for whatever reason) |
Registered Member
|
Just to update this thread, I've been noticing these focusing bugs intermittently since my previous post. I also see an additional bug that occurs quite frequently. I often have three windows open. When I open a new tab in two of them, typing immediately puts text into the address bar. However, the address bar is not highlighted, and there is no text cursor. Furthermore, when I press enter, nothing happens.
I tried to lodge a bug through `ubuntu-bug`, and realised that I was running the blue-shell patched version of Firefox. This version supposedly patches Firefox for KDE (filedialog + mimetypes), although I can't really tell the difference between this and the official Ubuntu Firefox. Anyway, since reverting to the official Ubuntu release, I haven't noticed any problems (yet). In addition, apparently the blue-shell patch lags somewhat behind official releases, and hence the latest-update cycle alternates between repositories. This might explain why I thought the bug had been fixed at points. |
Registered Member
|
I'm still getting this bug, and more frequently in Thunderbird. I've filed a bug report for Firefox.
=EDIT= See Thunderbird link for fix. |
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar