Bug 428015

Summary: menus block alt-tab window switching
Product: [Plasma] kwin Reporter: lvm
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.12.9   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description lvm 2020-10-20 09:50:45 UTC
SUMMARY

Some menus block window switching

STEPS TO REPRODUCE
1. start konsole
2. click on File top-level menu to open it
3. press alt-tab

OBSERVED RESULT
focus moves to the next item in the file menu

EXPECTED RESULT
task switcher window opens and takes control

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.12.9
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5

Yes, it's ancient (ubuntu 18.04.1 LTS) but people with fresher KDE say they've got this issue it too.

ADDITIONAL INFORMATION
Looks like all global shortcuts are blocked, not just alt-tab. Also when a menu is open autohiding panels won't reappear when mouse hovers over the hotspot, not sure is it the same issue or a new one should be created?
Comment 1 Vlad Zahorodnii 2020-10-20 11:05:42 UTC
The context menu grabs the keyboard so kglobalacceld [*] has no any way to process key events. We can't fix this bug. Sorry.

[*] kglobalacceld is a service that is responsible for monitoring key press events and activating shortcuts
Comment 2 lvm 2020-10-20 13:52:35 UTC
(In reply to Vlad Zahorodnii from comment #1)
> The context menu grabs the keyboard so kglobalacceld [*] has no any way to
> process key events. We can't fix this bug. Sorry.
> 
> [*] kglobalacceld is a service that is responsible for monitoring key press
> events and activating shortcuts

A program interfering with window switching is not an mere inconvenience but a nasty bug: it means that a buggy or malicious program can effectively lock user out of the system and I don't like giving up so easily here. If it cannot be fixed in kwin, perhaps it can be fixed somewhere else?
Comment 3 Vlad Zahorodnii 2020-10-20 15:28:21 UTC
(In reply to lvm from comment #2)
> A program interfering with window switching is not an mere inconvenience but
> a nasty bug: it means that a buggy or malicious program can effectively lock
> user out of the system and I don't like giving up so easily here. If it

That's why we have Wayland.

> cannot be fixed in kwin, perhaps it can be fixed somewhere else?

You could file a bug report against Xorg, but it will most likely be closed with a reason saying that there is wayland
Comment 4 lvm 2020-10-20 17:15:52 UTC
Ok, and what about autohiding panels not appearing when mouse hovers over the hotspot when menu is open?
Comment 5 Vlad Zahorodnii 2020-10-20 17:49:10 UTC
(In reply to lvm from comment #4)
> Ok, and what about autohiding panels not appearing when mouse hovers over
> the hotspot when menu is open?

This is because context menu typically also grab the pointer.
Comment 6 Vlad Zahorodnii 2020-10-20 17:49:20 UTC
context menus*