Bug 500890 - Spectacle does not respect the --output argument in the region mode, giving the user other options
Summary: Spectacle does not respect the --output argument in the region mode, giving t...
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 6.3.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-03-01 12:02 UTC by Ilya Bizyaev
Modified: 2025-03-05 15:51 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Bizyaev 2025-03-01 12:02:08 UTC
SUMMARY

For a company-internal tool, we need to invoke the desktop environment's screen shooter in region capture mode and save the resulting image to a file. Prior to Spectacle's region mode rewrite some versions ago, the following call worked as expected in the Plasma session:

$ spectacle -r -b -i -n -o result.png

Expanding:

$ spectacle --region --background --new-instance --nonotify --output result.png

But after the changes, the user can now exit the region capture mode with a different action, such as “Copy” or “Save as”. In these cases, the --output flag is ignored, and the tool does not get the resulting image.

If the user knows to press Enter or click “Save”, the tool can still be used as before, but all the extra options in an otherwise predetermined flow can lead to misunderstanding from users.

OBSERVED RESULT
The region mode allows exiting Spectacle in ways that seem like confirmation, but do not fulfill the requested --output flag.

EXPECTED RESULT
Ideally, when the --output flag is set, Spectacle's region mode would not display finalizing actions other than “Save”. I also wonder whether cancellation, such an Esc key press, should result in a non-zero return code from Spectacle.

SOFTWARE/OS VERSIONS
Reproducible on my personal device:

Operating System: openSUSE Tumbleweed 20250227
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.4-1-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Reporting now because https://invent.kde.org/graphics/spectacle/-/merge_requests/431 potentially worsens this problem by adding mode switch buttons.