Bug 74408

Summary: Modifier key press passed to application focused by Modifier+Mouse button
Product: [Plasma] kwin Reporter: Marcin Kasperski <Marcin.Kasperski>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marcin Kasperski 2004-02-06 22:14:50 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Debian stable Packages
OS:          Linux

Do the following:
- activate 'focus follows cursor' KDE desktop mode (I do not know whether it matters but I use it...)
- start some konsole
- start some other application and give it focus
- move mouse above the console
- Alt-middleclick the console to bring it to the top
- press Enter
Instead of moving to the new line within konsole window, you will open Session menu. Similarly, if instead of pressing Enter you start typing, your keypresses will be just ignored.

(Ohh, in fact I exchanged Alt-middleclick and Alt-leftclick shortcuts so in my case I used  Alt-leftclick to bring the window to the top but I doubt whether it can matter)
Comment 1 Marcin Kasperski 2004-02-06 22:19:48 UTC
Additional configuration note: in my setup neither of the two 'window recall' checkboxes are set in KDE window behaviour window, so the konsole window can have focus but simultaneously be partially hidden.

I have also checked that before the click the focus is correct, so we have:
- focus somewhere else
- mouse moved above konsole
- I type 'ls <enter>'
- I see the command results
- Alt-Click
- 'ls <enter>' again
- no command executed, Session menu opens
Comment 2 Stephan Binner 2004-02-15 18:16:34 UTC
An Alt keypress passes through to Konsole?
Comment 3 Marcin Kasperski 2004-04-20 13:28:27 UTC
I found one very specific situation in which terminal should have focus but it does not. After clicking the title bar! As the terminal is by far the most frequently used part of konsole, IT should be given focus after the window is given focus via clicking title-bar.

To try it: 
- use 'focus follow cursor' mode, 
- run konsole and something else (I just tried with konqueror opened on this bug),
- move mouse above the konqueror window so it is given focus, 
- then move mose above the konsole title-bar and left-click it,
- try writing 'ls Enter'...
Comment 4 Marcin Kasperski 2004-04-20 13:31:11 UTC
And wider comment: IMHO in case of konsole, the general rule should be that whenever konsole has keyboard focus, its terminal part has it - unless there is special reason to give it somewhere else (user clicked menu or scrollbar etc)
Comment 5 Marcin Kasperski 2004-04-20 13:31:52 UTC
Maybe this bug title could be a bit updated?
Comment 6 Marcin Kasperski 2004-04-20 13:50:18 UTC
For a short time it seemed to me that I found also the scenari for the Alt-click problem - it seemed that it happened when I pressed Alt before  the mouse entered konsole area (scenario 'press Alt having mouse above the konqueror, then having Alt pressed move mouse above konsole, click, release Alt). But ... after I reproduced it twice, the problem suddenly disappeared and I am not able to reproduce it for the third time. Seems something is more complicated here :-(  
Nevertheless I note this - mainly to note, that it is possible that the moment, when Alt is pressed, influence Alt-click behaviour - although it should not.

Comment 7 Marcin Kasperski 2005-10-14 13:19:51 UTC
I just upgraded to KDE 3.4.2 (Console 1.5.2). The problem seems to be still present, after alt-clicking console body still it is menu bar what gets the focus.
Comment 8 Philip Rodrigues 2006-09-09 11:50:24 UTC
As Stephan pointed out, it seems to be the Alt key getting sent to the Konsole window that was focused by Alt+click. This only seems to happen if you hold down Alt too long after clicking, although "too long" in this instance is, I guess, a few hundred ms.
Comment 9 Philip Rodrigues 2008-07-26 15:11:18 UTC
I can't reproduce this on svn trunk (r837737 "4.1.60"). The alt never gets passed through to konsole
Comment 10 Marcin Kasperski 2008-07-31 10:26:06 UTC
Well, years passed, a few KDE versions arrived, x11 turned into x.org...
I am using Gnome currently, so can't test it just now. One historical note: I was using Polish locale and keyboard. Maybe it could have some impact on the Alt key handling (Alt is used to achieve accented letters in a few combinations).
Comment 11 Lubos Lunak 2008-08-05 12:07:24 UTC
Cannot be reproduced anymore.