Bug 415688

Summary: printscr key doesn't capture screenshot with selected options when Spectacle is already open
Product: [Applications] Spectacle Reporter: ic35734 <ic>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: minor CC: kde, nate
Priority: NOR    
Version: 19.12.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 20.04.0

Description ic35734 2019-12-29 19:19:52 UTC
SUMMARY
Keyboard shortcut for "Launch Spectacle" will always capture the full screen (or the previously selected area option) instead of the selected area option until a screenshot is taken with the "Take a New Screenshot" button.

STEPS TO REPRODUCE
1. Open Spectacle or change the area option
2. Press the key combination for the Launch Spectacle shortcut

OBSERVED RESULT
Spectacle captures the full screen or the last selected area option before the "Take a New Screenshot" button was pressed.

SOFTWARE/OS VERSIONS
Linux: Arch Linux (5.4.5-arch1-1)
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.65.0
Qt Version: 5.13.2
Comment 1 Nate Graham 2020-01-02 16:43:53 UTC
Yes, that's what this key does. If you want to launch Spectacle and immediately capture a different kind of screenshot, you need to use a different keyboard shortcut. You can see the options in Spectacle's settings window > Shortcuts.
Comment 2 ic35734 2020-01-02 17:02:51 UTC
The other shortcuts are only for capturing a specific kind of screenshot and not whatever that is currently selected
Shouldn't this shortcut do exactly what the "Take a New Screenshot" button does when Spectacle is already open? I still think this is a bug
(In reply to Nate Graham from comment #1)
> Yes, that's what this key does. If you want to launch Spectacle and
> immediately capture a different kind of screenshot, you need to use a
> different keyboard shortcut. You can see the options in Spectacle's settings
> window > Shortcuts.
Comment 3 Nate Graham 2020-01-02 18:01:13 UTC
Oh you mean that when Spectacle is already running, pressing printscreen should take a screenshot according to what's in the combobox, exactly as if the "Take a new screenshot" button had been pressed?
Comment 4 ic35734 2020-01-02 23:01:25 UTC
Yeah exactly, instead it captures the full screen or the option that was selected the last time the "Take a New Screenshot" button was pressed like I said in the original post
(In reply to Nate Graham from comment #3)
> Oh you mean that when Spectacle is already running, pressing printscreen
> should take a screenshot according to what's in the combobox, exactly as if
> the "Take a new screenshot" button had been pressed?
Comment 5 Nate Graham 2020-01-03 00:22:09 UTC
Thanks, now I understand!
Comment 6 David Redondo 2020-01-31 10:03:37 UTC
Git commit a9c01acfaf66ebd3d3cee518640a9f8488d86f1d by David Redondo.
Committed on 31/01/2020 at 10:03.
Pushed by davidre into branch 'master'.

Take screenshot with currently selected options

Summary:
If Spectacle is running and the user activates the shortcut to start Spectacle
while he has the option "Take a new Screenshot" selected use the current settings
ad configured in the window and not those of the last taken Screenshot
FIXED-IN: 20.04.0

Test Plan: Open Spectacle, press print screen

Reviewers: #spectacle, ngraham

Reviewed By: #spectacle, ngraham

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D26929

M  +3    -5    src/SpectacleCore.cpp

https://commits.kde.org/spectacle/a9c01acfaf66ebd3d3cee518640a9f8488d86f1d