Bug 436627 - Mouse gestures don't work in Wayland
Summary: Mouse gestures don't work in Wayland
Status: RESOLVED INTENTIONAL
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_khotkeys (show other bugs)
Version: 5.22.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-05-05 12:51 UTC by Fushan Wen
Modified: 2023-10-01 03:07 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2021-05-05 12:51:11 UTC
SUMMARY
Under Wayland session, mouse gestures don't work.

STEPS TO REPRODUCE
1. Choose Plasma(Full Wayland) session to log in.
2. Perform any mouse gesture using the right mouse button.

OBSERVED RESULT
No mouse gesture was performed.

EXPECTED RESULT
Perform a mouse gesture.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210502
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Comment 1 David Edmundson 2021-06-26 22:12:08 UTC
This is expected. I should hide the UI.
Comment 2 Fushan Wen 2021-06-28 06:30:58 UTC
(In reply to David Edmundson from comment #1)
> This is expected. I should hide the UI.

So is there any plan to bring mouse gestures back for Wayland?
Comment 3 witchhunter 2021-06-28 16:38:06 UTC
> So is there any plan to bring mouse gestures back for Wayland?

Honest question. Talking about consistent workflow. This is a killer feature since not everyone is keyboard-centric. It could really distinguish Plasma from other DEs.
Comment 4 Simone 2022-01-31 15:42:50 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Fushan Wen 2022-03-03 13:13:00 UTC
https://invent.kde.org/plasma/khotkeys/-/merge_requests/21

This commit hides khotkeys on Wayland.
Comment 6 george fb 2022-05-01 05:58:01 UTC
Here's a Wayfire (Wayland compositor) plugin https://github.com/dkondor/wstroke (a port of easy stroke) that adds mouse gestures, maybe it helps in some way. Tested it on Fedora and it works.
Comment 7 Fushan Wen 2022-05-23 00:24:52 UTC
I tried to dig into kwin, and the conclusion is that currently it's almost impossible to implement the feature on Wayland because an effect can't send a mouse event or a key event to the original window, which is the main blocker.
Comment 8 witchhunter 2022-05-23 16:49:17 UTC
(In reply to Fushan Wen from comment #7)
> because an effect can't send a mouse event or a key event to the original window, which is the main blocker.

OK, you've got me all confused here.
The main purpose of mouse gesture applications is to invoke command on given gesture.

The course of events with e.g. EasyStroke is:
1) detect mouse gesture trigger
2) recognize gesture
3) execute the associated shell command

The only reason you would want KWin involved is to:
1) detect window below the point where gesture has started (so you could have the ability for different mouse buttons to invoke gestures while over different window classes)
2) input text/"paste" it on the window

The first is an excellent feature but it was never implemented in Plasma (X11).
The latter is, from my understanding, very hard if not impossible to implement in Wayland. But, given the maturity of Klipper and its further development and the fact that it is not a feature heavily used, it might be as well dropped for now.
Comment 9 Fushan Wen 2022-05-24 02:42:21 UTC
The mouse gesture plugin need to send mouse events to the original window to let context menu work, but an effect can't do that.
Comment 10 Fushan Wen 2023-05-06 14:36:01 UTC
khotkeys is not available in Plasma 6. Closing this bug...
Comment 11 Fushan Wen 2023-09-27 16:38:24 UTC
There is a chance to implement it. See https://discuss.kde.org/t/mouse-gestures-support-on-plasma-6-wayland/5549/1 if you are willing to donate!