Bug 364118 - present windows alternate activation key does not toggle
Summary: present windows alternate activation key does not toggle
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-present-windows (show other bugs)
Version: 5.6.4
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-08 21:30 UTC by Jason Tibbitts
Modified: 2022-05-05 15:11 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Tibbitts 2016-06-08 21:30:49 UTC
This is kind of a weird one.  I wanted two different sets of hotkeys to activate present windows, and convenientky there are "Global" and "Global Alternate" hotkeys.  But while both hotkeys will activate the present windows effect, the alternate one will not act as a toggle.  This happens regardless of the keys I assign.

This might happen for other toggleable effects; I didn't try.


Reproducible: Always

Steps to Reproduce:
Assign a global alternate hotkey to the 'Toggle Present Windows (All desktops) action.

Press that hotkey to activate the present windows effect.

Press that hotkey again.

Actual Results:  
The present windows effect does not toggle off.

Expected Results:  
The present windows effect toggles off.

I'm running kwin 5.6.4 as packaged in Fedora 24.
Comment 1 Martin Flöser 2016-06-10 13:11:05 UTC
Yeah makes sense. The effect grabs the keyboard, thus it implements the toggle by itself. The toggle got implemented before alternative keys were supported, so it only knows about the primary key.

Anyway: on Wayland I'm sure it works.
Comment 2 Jason Tibbitts 2016-06-10 18:21:18 UTC
I'm not sure how long it's going to take for Wayland to actually become a viable alternative to X, though.  So in the meantime, if you have any hints as to where in the source that toggling is implemented I'd be happy to take a look (unless you're already planning to look into this yourself, of course).  The last time I wrote C++ was using cfront, but I can probably make something work.
Comment 3 Martin Flöser 2016-06-13 09:52:53 UTC
the relevant code is in:
git://anongit.kde.org/kwin
file: effects/presentwindows/presentwindows.cpp

The problematic code might be in method globalShortcutChanged. If I interpret the code correctly it results in alternative shortcuts being removed.
Comment 4 Alexander Mentyu 2018-07-19 09:25:13 UTC
Toggle with alternative hotkey doesn't happening in Wayland

Distribution: Netrunner Rolling
Kernel: 4.18.0-1-MANJARO
Plasma: 5.13.3
Apps: 18.04.3
Qt: 5.11.1
Frameworks: 5.48.0
Wayland: 1.15.0
Graphics:  Card-1: Intel Haswell-ULT Integrated Graphics 
           driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0a16 
           Display: wayland server: X.Org 1.20.0 
           driver: intel unloaded: modesetting alternate: fbdev,vesa 
           compositor: kwin wayland tty: N/A 
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile 
           v:4.5 Mesa 18.1.4 compat-v: 3.0 direct render: Yes
Comment 5 Patrick Silva 2019-02-28 21:39:55 UTC
I can't confirm the problem on X11. Confirmed on Wayland - bug 404627 seems related. Tested meta+r as global alternate shorcut.

Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.0
Comment 6 Nate Graham 2022-05-05 15:11:46 UTC
This has been fixed with the rewrite in Plasma 5.25, done by Marco Martin with https://invent.kde.org/plasma/kwin/-/commit/376ee357dbc50fec3b6e71c40938171ddb2e726a!