Announcement

Collapse
No announcement yet.

Keystrokes sent to window without focus in Firefox/Thunderbird

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Keystrokes sent to window without focus in Firefox/Thunderbird

    I've written about this previously at the kde forums, but it seems that it might be specific to Kubuntu, so I'll try here.

    I've also filed a bug with mozilla, but I never seem to get responses over there, (and it might be a problem with Kubuntu anyway). I'm using Kubuntu 13.04, with KDE 4.10.5. There was one comment on the mozilla bug, and they said they were also using Kubuntu, as did the single confirmation in the KDE forums. I'll briefly describe the bug, as per the mozilla bug.


    Recently, probably in the upgrade to Thunderbird 24.0, I've found that the front-most, active window often will not receive keystrokes. Instead they are being sent to the background, inactive window. For example, I attempt to reply to an email, and start typing. I see text in the body as expected, then a second after beginning, the text is sent to the main "mail index" window. The front-most window is shown as selected in the pager, while a non-selected window receives the keystrokes. This means that for long periods, I am unable to send and compose emails. In addition, I'm also often mid-sentence when I realise that the characters aren't appearing, and I've done some weird filing/labelling in the mail index window.

    I can alt-tab or click between windows, but cannot seem to type into the compose window. Otherwise, clicking does all you expect it to. You can select menus of the window; you can even select text (although it's the "background window" grey instead of the "foreground window" blue).

    I tried to make sure that it was not an issue with X/KDE by testing to see what the reported active window was.

    Code:
    $ xwininfo | grep -i 'window id'
    xwininfo: Window id: 0x3c001f6 "Inbox - Uni - Mozilla Thunderbird"
    $ xwininfo | grep -i 'window id'
    xwininfo: Window id: 0x3c0670c "Write: Re: Foo Bar - Unicode (UTF-8)"
    $ sleep 1 && xprop -root | grep -E '^_NET_ACTIVE_WINDOW'
    _NET_ACTIVE_WINDOW(WINDOW): window id # 0x3c001f6
    $ sleep 1 && xprop -root | grep -E '^_NET_ACTIVE_WINDOW'
    _NET_ACTIVE_WINDOW(WINDOW): window id # 0x3c0670c
    It seems that even when the active window is reported to be the compose window by X, it will still not receive input. I presume that it's Thunderbird hijacking the active window internally.

    I've tried starting in safe mode and manually downloading and running Thunderbird from the website (64-bit version), instead of using the version in the repositories. In both cases, I still hit this bug.

    I don't see this in any other application, except for Firefox occasionally. It used to be fairly frequent in Firefox starting in a release around February, but appears to have diminished in frequency since then.

    I did similar troubleshooting in Firefox for active window using xev, but this is now buggy and doesn't work. First I found window IDs with

    Code:
    xwininfo | grep -i 'window id'
    Then, when the bug occurred, I attempted to see if keystrokes were being passed to the active (but non-responsive) window with

    Code:
    xev -id 0x123456 | grep Key
    I also did the same for the background window that was actually responding to the keystrokes. It seems that the active (but non-responsive) window was indeed receiving keystrokes, and the other one was not, although it was responding to them. I presume that again, it's Firefox hijacking the active window internally. It's probably easier for me to do more troubleshooting in Thunderbird, since it's more frequent.

    I checked bugzilla to see this had already been filed, but found nothing. However, I'm unsure if this is related: https://bugzilla.mozilla.org/show_bug.cgi?id=831854

    ==EDIT==
    The feel over at the KDE forums was that since X was responding as expected, it was probably a Mozilla bug. I was just unsure if Kubuntu might be to blame, since all the users hitting it are Kubuntu users.

    ==EDIT2==
    It seems like this is a conflict with unclutter. Either disabling unclutter, or using the `-noevents ` option is a valid workaround.
    Last edited by sparhawk; Nov 06, 2013, 05:22 AM. Reason: code typo
Working...
X