Bug 432006

Summary: Exiting region capture in background mode causes application to hang
Product: [Applications] Spectacle Reporter: Magnus Boman <magunasu.b97>
Component: GeneralAssignee: Antonio Prcela <antonio.prcela>
Status: RESOLVED FIXED    
Severity: normal CC: antonio.prcela, kde, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 20.12.2

Description Magnus Boman 2021-01-23 18:38:53 UTC
SUMMARY

When running in background mode and having activated region capture, if the user quits without taking a picture (pressing ESC) Spectacle just sits there doing nothing until you forcefully quit it.

STEPS TO REPRODUCE
1. Run `spectacle --region --background`
2. Once the overlay shows up, press ESC
3. Look at terminal as application doesn't exit

OBSERVED RESULT
Spectacle locks up/freezes

EXPECTED RESULT
Spectacle to quit and throw a non-zero code

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux 5.10.9-zen1-1-zen
(available in About System)
KDE Plasma Version: 5.20.90
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Affects both 20.12.1 and latest git (e1fc5c4)
Comment 1 Antonio Prcela 2021-01-23 20:17:11 UTC
Can confirm
Also, same bug when launched via "Meta + Shift + Prt.sc"
Comment 2 Bug Janitor Service 2021-01-23 20:20:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/50
Comment 3 Magnus Boman 2021-01-23 21:09:48 UTC
The linked MR fixes the issue for me, thanks for the super quick fix!
Comment 4 Antonio Prcela 2021-01-25 19:55:43 UTC
Git commit a232723b35a1c2c2d8f27f6bf4a59f2ff3775863 by Antonio Prcela.
Committed on 25/01/2021 at 19:51.
Pushed by ngraham into branch 'release/20.12'.

If region capture is cancelled, close Spectacle

This fixes the bug that keeps Spectacle running, happens when it's launched via either spectacle --region --background or Meta + Shift + Prt.sc.

M  +2    -0    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/commit/a232723b35a1c2c2d8f27f6bf4a59f2ff3775863