Bug 270144 - alt-tab leaves windows with strange focus/keyboard state
Summary: alt-tab leaves windows with strange focus/keyboard state
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 13:02 UTC by Mats Ahlgren
Modified: 2015-03-22 11:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mats Ahlgren 2011-04-05 13:02:24 UTC
Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

If one alt-tabs enough, one will notice that some windows "lose focus" or enter a strange state, where the user has to find the mouse and window and click it, in order to resume his workflow. This is fairly annoying.

Reproducible: Always

Steps to Reproduce:
I have a hunch that it involves some sort of race condition or unclean representation state for the keyboard. For example, if one hits 'alt' in konsole, then alt-tabs, then alt-tabs back, this triggers the issue. The issue also naturally happens when just alt-tabbing, once every minute or so.

Actual Results:  
The window is not in the state it was in before any modifiers were pressed, with focus possibly in some different part of the window. In Konsole, the text cursor turns from full-opaque-block to outlined-block, and text input is impossible before clicking (alternative: hit ctrl-pgup then ctrl-pgdn).

Expected Results:  
The window should be in the state it was in before any modifiers were pressed, with focus in the same location of the window.

OS: Linux (x86_64) release 2.6.34.7-0.3-desktop
Compiler: gcc
Comment 1 Mats Ahlgren 2011-04-05 13:03:13 UTC
This might also happen when using Compiz though, so perhaps it is an X server issue.
Comment 2 Thomas Lübking 2011-04-05 21:54:51 UTC
a) 4.4.4 is a little dated ;-)
b) if this occurs with several windonw managers it's either an issue in X11 or (has been, doesn't happen here) in konsole.
   b1)  assuming you're using the evdev keyboard driver, try the kbd one (no idea how recent your Xorg is, but judging by KDE/linux - rather older =)
   b2) if it would only happen with konsole, upgrade KDE and check again.

please report your insights.
Comment 3 Martin Flöser 2011-06-04 09:29:59 UTC
no response for quite some time, please answer questions.
Comment 4 Jaap Eldering 2015-03-22 11:49:37 UTC
I can reproduce the very same behaviour as described by the OP: frequently when switching windows/workspaces, the konsole terminal has "lost focus": the title bar is active, but the cursor is hollow and doesn't respond to keyboard input. Pressing 'alt' and then switching away and back with 'alt-tab' consistently reproduces the issue. I cannot regain proper focus with 'ctrl+pg{up,dn}' only with a mouse click.

My configuration: I'm running Debian Jessie with Konsole 4.14.2-1 running on Openbox 3.5.2-8 as window manager (and Xfce partially as desktop manager), and Xorg 7.7+7. My keyboard driver is "kbd".

This has started happening to me only recently. Two possibly relevant changes to my system: konsole was upgraded from 4.8.4-2 to 4.14.2-1, and I had un/reinstalled some Xfce related packages due to an attempt to crossgrade from i386 to amd64 architecture (but that failed and I reverted). I cannot find any relevant configuration changes due to this (I have /etc in git).
Comment 5 Thomas Lübking 2015-03-22 11:58:49 UTC
> My configuration: I'm running Debian Jessie with Konsole 4.14.2-1 
> running on Openbox 3.5.2-8 as window manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> (and Xfce partially as desktop manager), and Xorg 7.7+7. My keyboard driver is "kbd".

You're on the wrong bugtracker - this is for KWin, the KDE window manager (and the bug was reported on KDE 4.4.4 - dated even 3 years ago ;-)

But thank you anyway for confirming comment #1 on that this is not a KWin bug =)

If however *only* konsole is affected, this might be a bug in konsoles shortcut handling.
Also please notice that "kbd" is virtually unmaintained, you should use the Xorg evdev driver.