Bug 370146 - Window rule to block global shortcuts doesn't block meta
Summary: Window rule to block global shortcuts doesn't block meta
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 5.8.0
Platform: Gentoo Packages Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D2952
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-05 18:27 UTC by AiwendilH
Modified: 2016-10-06 11:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.8.1
Sentry Crash Report:
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AiwendilH 2016-10-05 18:27:48 UTC
Setting a window rule for a programs to block all global shortcuts blocks combined <meta> shortcuts like an application start shortcuts <windows>+<b> for a browser (self created shortcut)..but doesn't block <windows> alone to open the menu (using appdash as menu).

Reproducible: Always

Steps to Reproduce:
1. start a program
2. Enter the windows rules (<alt><f3> -> More actions->Special settings for this window)
3.  4th Tab (Appearance and corrections) (Sorry, german KDE...english terms might not be completely correct) -> Enable "Ignore Global shorctus" and set to "Force"
4. Shortcut combinations with <meta> are blocked...meta itself for menu is not blocked and opens the menu.

Actual Results:  
The start-menu opens

Expected Results:  
<meta> shortcut being blocked along with all other global shortcuts.

Overall not really important I guess...but surprising. Maybe it's even meant to work this way. Just feels wrong for me with an option "Block global shortcuts"...the menu seems to be a global shortcut for me.
Comment 1 Martin Flöser 2016-10-06 05:15:23 UTC
The reason is that the modifier-only-shortcuts are not using kglobalaccel, so don't know anything about it being blocked. Should be easy to fix, though.
Comment 2 Martin Flöser 2016-10-06 05:38:27 UTC
Git commit 26ad65b1e9875c17e59e50cf4e2f0734caeeb20d by Martin Gräßlin.
Committed on 06/10/2016 at 05:36.
Pushed by graesslin into branch 'Plasma/5.8'.

Test case for mod only shortcut with global shortcuts disabled

KWin supports disabling global shortcuts while a specific window is
active through window rules. This blocks global shortcuts but does not
block the modifier-only-shortcuts as the new test case shows.

M  +72   -0    autotests/integration/modifier_only_shortcut_test.cpp

http://commits.kde.org/kwin/26ad65b1e9875c17e59e50cf4e2f0734caeeb20d
Comment 3 Martin Flöser 2016-10-06 05:44:13 UTC
Addressed with https://phabricator.kde.org/D2952
Comment 4 AiwendilH 2016-10-06 09:01:02 UTC
Well...that was fast...thanks a lot. :-)
Comment 5 Martin Flöser 2016-10-06 11:29:01 UTC
Git commit db2ff13d4fa83307b85cbe8622a8e37cb309c4a2 by Martin Gräßlin.
Committed on 06/10/2016 at 11:28.
Pushed by graesslin into branch 'Plasma/5.8'.

Only trigger mod-only-shortcuts if global shortcuts are enabled

Summary:
KWin supports blocking global shortcuts when a window is active through
window specific rules. This change ensures that the modifier only
shortcuts also honor the blocking of global shortcuts. If global
shortcuts are disabled, they won't trigger any more.
FIXED-IN: 5.8.1

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2952

M  +0    -1    autotests/integration/modifier_only_shortcut_test.cpp
M  +2    -1    keyboard_input.cpp

http://commits.kde.org/kwin/db2ff13d4fa83307b85cbe8622a8e37cb309c4a2