Bug 446971

Summary: When I press meta+ctrl+print, Spectacle fails to take a screenshot of the window under cursor and gets stuck in the memory
Product: [Applications] Spectacle Reporter: Patrick Silva <bugseforuns>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: antonio.prcela, kde, nate, p.r.worrall
Priority: HI    
Version: 22.04.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 22.04.2

Description Patrick Silva 2021-12-14 11:49:11 UTC
STEPS TO REPRODUCE
1. use Wayland session 
2. open any window
3. hover over the window
4. try to take a screenshot of the window under cursor by pressing meta+ctrl+print shortcut 

OBSERVED RESULT
apparently nothing happens. If I open System Activity by pressing ctrl+esc, I see Spectacle process
stuck in the memory.

EXPECTED RESULT
Spectacle should take a screenshot of the window under cursor when we press meta+ctrl+print

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 1 Nate Graham 2021-12-15 17:26:31 UTC
Can confirm!
Comment 2 Patrick Silva 2022-01-13 21:42:15 UTC
Can reproduce on Plasma 5.24 beta even by pressing shift+print.

Operating System: Arch Linux
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 3 Paul Worrall 2022-05-29 09:11:06 UTC
This bug also affects X11

I think there is a missing -1 at the end of: https://invent.kde.org/graphics/spectacle/-/blob/master/desktop/org.kde.spectacle.desktop.cmake#L405
Comment 4 Paul Worrall 2022-05-29 10:27:14 UTC
Submitted merge request: https://invent.kde.org/graphics/spectacle/-/merge_requests/137
Comment 5 Nicolas Fella 2022-05-30 19:33:24 UTC
Git commit e28ba9c1199cc9b2524903000ebcbe83fe61f267 by Nicolas Fella, on behalf of Paul Worrall.
Committed on 30/05/2022 at 19:33.
Pushed by nicolasfella into branch 'master'.

Update org.kde.spectacle.desktop.cmake to include both required parameters for WindowUnderCursor

M  +1    -1    desktop/org.kde.spectacle.desktop.cmake

https://invent.kde.org/graphics/spectacle/commit/e28ba9c1199cc9b2524903000ebcbe83fe61f267
Comment 6 Nicolas Fella 2022-05-30 19:34:13 UTC
Git commit 8beca3b9fdc1beffc7172155f3ae3a239ec9993d by Nicolas Fella, on behalf of Paul Worrall.
Committed on 30/05/2022 at 19:33.
Pushed by nicolasfella into branch 'release/22.04'.

Update org.kde.spectacle.desktop.cmake to include both required parameters for WindowUnderCursor
(cherry picked from commit e28ba9c1199cc9b2524903000ebcbe83fe61f267)

M  +1    -1    desktop/org.kde.spectacle.desktop.cmake

https://invent.kde.org/graphics/spectacle/commit/8beca3b9fdc1beffc7172155f3ae3a239ec9993d