Bug 381778 - Spectacle should ignore "Capture Rectangular Region" action if it's in progress
Summary: Spectacle should ignore "Capture Rectangular Region" action if it's in progress
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-29 02:29 UTC by whitequark
Modified: 2019-06-12 14:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description whitequark 2017-06-29 02:29:53 UTC
I have the "Capture Rectangular Region" action bound to the PrtScr button. If it is pressed several times, then a corresponding amount of Spectacle instances is invoked, which is very confusing because the instruction message does not disappear after being followed. If it is pressed and held (a cat on the keyboard reproduces this nicely) then the system rapidly becomes completely unusable because of memory exhaustion. If it is pressed twice in very rapid succession (this is somewhat hard to reproduce) then sometimes Spectacle locks up.

All of these issues would be solved by refusing to reenter this action if it's already in progress.
Comment 1 Boudhayan Gupta 2019-06-12 08:20:58 UTC
This is exactly why I'd initially coded Spectacle to never launch a new instance when invoked via the keyboard shortcuts, but at some point after I gave up maintainership this was changed. This, and the fact that you can abuse the PrintScr button to prank someone by holding it down and essentially fork-bombing the computer.

I'm all for reverting it back to the old behaviour, but I'd like to get @ngraham's opinion on this.
Comment 2 David Redondo 2019-06-12 08:32:29 UTC
Hi, I did the printscreen to open a new instance change. However this was after this bug report.
Comment 3 Boudhayan Gupta 2019-06-12 08:47:45 UTC
I think this should probably be configurable behaviour that defaults to "use the current instance".
Comment 4 David Redondo 2019-06-12 08:48:38 UTC
It actually is. The default is to take a new screenshot.
Comment 5 Boudhayan Gupta 2019-06-12 08:51:28 UTC
Oh, so it is! Let's close this as fixed then.
Comment 6 whitequark 2019-06-12 13:37:43 UTC
How exactly is this fixed? I can still reproduce the problem and there is no configuration setting.
Comment 7 Boudhayan Gupta 2019-06-12 14:08:49 UTC
Make sure you have the latest version of Spectacle, then click Configure in the main window. The first option on the first page should be what you need to adjust.

Note that this only works if you use DBus invocation for your custom khotkeys configuration.