Bug 469646 - Spectacle opens and then closes immediately if configured to copy/save automatically and auto-quit
Summary: Spectacle opens and then closes immediately if configured to copy/save automa...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 23.04.1
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-12 03:14 UTC by Patrick Silva
Modified: 2023-07-29 04:33 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-05-12 03:14:39 UTC
STEPS TO REPRODUCE
1. check 'Save file to default folder' and select 'Copy image to clipboard' in Spectacle settings
2. check the option to auto-quit after saving or copying to clipboard
3. open Spectacle by pressing the printscreen key or via Kickoff launcher
 

OBSERVED RESULT
Spectacle opens and then closes immediately

EXPECTED RESULT
Spectacle should only auto-quit after copying/saving manually

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Graphics Platform: X11
Comment 1 Gravemind2015 2023-05-15 06:42:16 UTC
Can confirm, happens even without the 'save file to default folder' box checked. In my observation, the issue seems to only occur when spectacle is set to take a screenshot upon launch and 'After taking the screenshot' option is set  to 'Copy image to clipboard' as opposed to 'Do not copy anything' or 'Copy file location to clipboard'. Maybe it's registering as a 'manual copy'? (dunno, just a dumb guess from a noob).

A way to get out of this spectacle-closing situation is to access spectacle settings either via keyboard shortcut > rectangular area screenshot > annotation toolbar or via kickoff > right click spectacle > launch without taking screenshot and disable either screenshot on startup or copying to clipboard.

Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.15-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Memory: 17.5 GiB of RAM
Graphics Processor: AMD Radeon Vega 8 Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: VivoBook_ASUSLaptop X512DA_X512DA
System Version: 1.0
Comment 2 Josh 2023-05-15 17:10:13 UTC
Last time I used Spectacle I had it in "whole screen" mode. I also have had the auto-quit option checked for a while and it's worked fine. Now, when I start Spectacle (e.g. via Super, "spec" <enter>), it will open (see icon on taskbar) but no UI shows. It takes the whole-screen screenshot and then quits after notifying me that the screenshot is in my clipboard. 

So I can work with it, by pasting into GIMP, but I can't get the UI at all in Spectacle.
Comment 3 Nate Graham 2023-05-16 19:27:26 UTC
lol can also reproduce
Comment 4 Nate Graham 2023-05-16 19:27:54 UTC
Raising priority to HI because it may not be clear how to undo this state of affairs.
Comment 5 Noah Davis 2023-07-24 20:24:03 UTC
Git commit ed6c94f5178e58d57f62e1b32928562d76db6680 by Noah Davis.
Committed on 24/07/2023 at 22:23.
Pushed by ndavis into branch 'master'.

Avoid auto quitting on auto save

We now have a way to specify when an export action is explicitly done by
the user.

How to test: enable quit on manual save and check save file to default folder

M  +8    -6    src/ExportManager.h
M  +4    -4    src/Gui/CaptureWindow.cpp
M  +5    -4    src/Gui/SpectacleWindow.cpp
M  +12   -22   src/SpectacleCore.cpp
M  +1    -1    src/SpectacleCore.h

https://invent.kde.org/graphics/spectacle/-/commit/ed6c94f5178e58d57f62e1b32928562d76db6680
Comment 6 Noah Davis 2023-07-25 00:05:20 UTC
Git commit 32c3a4d1e87f0b0edf32d839a206adf99e1df0c2 by Noah Davis.
Committed on 24/07/2023 at 22:24.
Pushed by ndavis into branch 'release/23.08'.

Avoid auto quitting on auto save

We now have a way to specify when an export action is explicitly done by
the user.

How to test: enable quit on manual save and check save file to default folder


(cherry picked from commit ed6c94f5178e58d57f62e1b32928562d76db6680)

M  +8    -6    src/ExportManager.h
M  +4    -4    src/Gui/CaptureWindow.cpp
M  +5    -4    src/Gui/SpectacleWindow.cpp
M  +12   -22   src/SpectacleCore.cpp
M  +1    -1    src/SpectacleCore.h

https://invent.kde.org/graphics/spectacle/-/commit/32c3a4d1e87f0b0edf32d839a206adf99e1df0c2