Bug 432011

Summary: "On click" feature is available in the Wayland session but doesn't work
Product: [Applications] Spectacle Reporter: Patrick Silva <bugseforuns>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: justin.zobel, kde, nate, noahadvs
Priority: NOR Keywords: wayland-only
Version First Reported In: 22.08.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Patrick Silva 2021-01-23 22:54:42 UTC
SUMMARY
There is no "On lick" checkbox beside "Delay" spinbox when Spectacle runs
on Wayland session.

STEPS TO REPRODUCE
1. open Spectacle on Wayland session
2. 
3. 

EXPECTED RESULT
"On click" feature available on Wayland session

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.21 beta
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 1 Justin Zobel 2022-11-11 04:48:54 UTC
Confirmed on 22.08.2 on Fedora 37.
Comment 2 Noah Davis 2022-12-07 09:15:37 UTC
The reason why is that PlatformKwinWayland2 (a platform abstraction class that Spectacle uses) currently doesn't support "On Click". I'm not sure why "On Click" isn't supported. Maybe a KWin dev would know since KWin is responsible for capturing the screen?
Comment 3 Nate Graham 2022-12-07 19:28:28 UTC
We should just hide it on Wayland until it works, or can work.
Comment 4 Noah Davis 2022-12-08 08:59:20 UTC
(In reply to Nate Graham from comment #3)
> We should just hide it on Wayland until it works, or can work.

In the new UI, it is disabled when the environment doesn't support both on click and immediate modes. Is that good enough?
Comment 5 Nate Graham 2022-12-08 20:15:08 UTC
It doesn't seem to be working, then. On Wayland, I see the checkbox, and it's enabled, but it doesn't do anything.
Comment 6 Bug Janitor Service 2023-01-17 10:21:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/181
Comment 7 David Redondo 2023-01-17 10:21:51 UTC
This would need to be implemented inside KWin
Comment 8 David Redondo 2023-01-17 10:25:06 UTC
Actually it is already in KWin from what I am seeing, just need to hook it up
Comment 10 David Redondo 2023-01-17 16:09:56 UTC
Git commit 3daf87bed4d5ee9a04fca581ebbe0c05e98aacbb by David Redondo.
Committed on 17/01/2023 at 10:33.
Pushed by ngraham into branch 'master'.

Fix on click checkbox enablement

The parentheses are needed otherwise the comparison is done first.

M  +1    -1    src/Gui/CaptureSettingsColumn.qml

https://invent.kde.org/graphics/spectacle/commit/3daf87bed4d5ee9a04fca581ebbe0c05e98aacbb