STEPS TO REPRODUCE 1. Run spectacle --background --clipboard --region --nonotify 2. Select a region, confirm OBSERVED RESULT The screenshot does not get copied to clipboard. And another side effect I noticed was that the desktop seemed to be frozen after the screenshot for a few seconds (roughly the same as how long a notification stays on screen when Spectacle is called without --nonotify), during which I cannot call KRunner, cannot pop up Latte Dock, etc. EXPECTED RESULT The screenshot is sent to clipboard. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.16.4-1 KDE Frameworks Version: 5.61.0-1 Qt Version: 5.13.0-7
I get the following error: kf5.kconfig.core: "\"cropRegion\" - conversion of \"0,0,0,0\" to QRect failed" And it freeze. Can confirm it and will have a look into it.
Git commit 331d3ceaaf74ce376a08b2efcf4394e45f8a8e97 by David Redondo, on behalf of Antonio Prcela. Committed on 28/08/2019 at 13:48. Pushed by davidre into branch 'Applications/19.08'. FIX: Close spectacle if it's started with: -b -c Summary: Spectacle should close if both `-b` and `-c` are set Preparation to fix this one: Test Plan: start spectacle: spectacle -b -c Expected: # Spectacle runs in background and the screenshot gets saved to clipboard # Spectacle closes itself after the notification disappears (or has been closed by the user) Observed: # Spectacle runs in background and the screenshot gets saved to clipboard # Spectacle never quits Reviewers: davidre Subscribers: ngraham, #spectacle Tags: #spectacle Differential Revision: https://phabricator.kde.org/D23522 M +6 -5 src/SpectacleCore.cpp https://commits.kde.org/spectacle/331d3ceaaf74ce376a08b2efcf4394e45f8a8e97
works: spectacle -b -c (image ends up in clipboard) spectacle -b -n (image ends up in the default save location) does not work: spectacle -b -c -n So the combination of -c & -n is troublesome. I'm looking into it for a few days now and I'd say that Spectacle gets closed too fast and it doesn't have time to save the image into the clipboard. But I ain't 100% sure. maybe delay 'emit allDone()' if both -c & -n are set? https://cgit.kde.org/spectacle.git/tree/src/SpectacleCore.cpp#n281
The freezing isn't related to notifications but is triggered by QApplication::clipboard()->setMimeData(data, QClipboard::Clipboard); and can also be observed when clicking on copy to clipboard in the GUI.
Git commit 02f51eb2652fff0cc3471cf5cf3df73d214641c2 by Nate Graham, on behalf of Antonio Prcela. Committed on 06/12/2019 at 13:36. Pushed by ngraham into branch 'master'. Save image to clipboard if --nonotify is used Summary: BUG: 411263 Test Plan: run spectacle with --nonotify Reviewers: #spectacle, davidre, ngraham Reviewed By: #spectacle, davidre, ngraham Subscribers: ngraham, #spectacle Tags: #spectacle Differential Revision: https://phabricator.kde.org/D23723 M +5 -1 src/SpectacleCore.cpp https://commits.kde.org/spectacle/02f51eb2652fff0cc3471cf5cf3df73d214641c2
As of version 19.12.2-1, this bug seems to still be present. I am running on Arch Linux, and have tested using: spectacle -bnc as well as spectacle --background --nonotify --clipboard No output is given from the command and Plasma seems to freeze for a short duration. There is also nothing in the clipboard.
(In reply to malachy1681 from comment #6) > As of version 19.12.2-1, this bug seems to still be present. I am running > on Arch Linux, and have tested using: > > spectacle -bnc > > as well as > > spectacle --background --nonotify --clipboard > > No output is given from the command and Plasma seems to freeze for a short > duration. There is also nothing in the clipboard. I just checked with 20.03.70. So far, copy to clipboard does not work if used standalone (spectacle -c) or in combination with background and nonotify (spectacle -bnc & spectacle -nc): command background clipboard nonotify RESULT spectacle -bn Y (ok) Y (ok) GOOD spectacle -bc Y (ok) Y (ok) GOOD spectacle -b Y (ok) GOOD spectacle -n Y (ok) GOOD spectacle -bnc Y (ok) N (BAD) N (ok) BAD spectacle -nc N (BAD) Y (ok) BAD spectacle -c N (BAD) BAD Will look into it in the next few days.
(In reply to Antonio from comment #7) > (In reply to malachy1681 from comment #6) > > As of version 19.12.2-1, this bug seems to still be present. I am running > > on Arch Linux, and have tested using: > > > > spectacle -bnc > > > > as well as > > > > spectacle --background --nonotify --clipboard > > > > No output is given from the command and Plasma seems to freeze for a short > > duration. There is also nothing in the clipboard. > > I just checked with 20.03.70. So far, copy to clipboard does not work if > used standalone (spectacle -c) or in combination with background and > nonotify (spectacle -bnc & spectacle -nc): > > command background clipboard nonotify RESULT > > spectacle -bn Y (ok) Y (ok) GOOD > spectacle -bc Y (ok) Y (ok) GOOD > spectacle -b Y (ok) GOOD > spectacle -n Y (ok) GOOD > > spectacle -bnc Y (ok) N (BAD) N (ok) BAD > spectacle -nc N (BAD) Y (ok) BAD > spectacle -c N (BAD) BAD > > > Will look into it in the next few days. I have made a mistake here. Clipboard doesn't work at all... Now this narrows it down and should be 'easily' fixed. Might fix it until this weekend.
>I have made a mistake here. >Clipboard doesn't work at all... -b -c and -b -c -n work fine here. Do you have Klipper running?
(In reply to David Redondo from comment #9) > >I have made a mistake here. > >Clipboard doesn't work at all... > > -b -c and -b -c -n work fine here. Do you have Klipper running? Yes I have Klipper running. -b -c works now too -b -c -n does save the image into Klipper, but ctrl+v into an image editor doesn't do anything
(In reply to Antonio from comment #10) > Yes I have Klipper running. > -b -c works now too > -b -c -n does save the image into Klipper, but ctrl+v into an image editor > doesn't do anything Then this is probably a bug in Klipper. If the image is in Klipper from Spectacle side we can't do anything anymore we copied it to the clipboard and at this point Spectacle is not even running anymore.
(In reply to David Redondo from comment #11) > (In reply to Antonio from comment #10) > > Yes I have Klipper running. > > -b -c works now too > > -b -c -n does save the image into Klipper, but ctrl+v into an image editor > > doesn't do anything > > Then this is probably a bug in Klipper. If the image is in Klipper from > Spectacle side we can't do anything anymore we copied it to the clipboard > and at this point Spectacle is not even running anymore. Ok. leaves us with: spectacle -nc spectacle -c does this work for you? Here it doesn't save anything to clipboard, just launches Spectacle with a screenshot taken.
(In reply to Antonio from comment #12) > Ok. leaves us with: > spectacle -nc > spectacle -c > does this work for you? Here it doesn't save anything to clipboard, just > launches Spectacle with a screenshot taken. Currently this is intentional that it only works in background mode and is documented as such. I didn't implement it myself this way but see the following comments for reference: https://phabricator.kde.org/D19715#429973
(In reply to David Redondo from comment #13) > (In reply to Antonio from comment #12) > > Ok. leaves us with: > > spectacle -nc > > spectacle -c > > does this work for you? Here it doesn't save anything to clipboard, just > > launches Spectacle with a screenshot taken. > > Currently this is intentional that it only works in background mode and is > documented as such. I didn't implement it myself this way but see the > following comments for reference: https://phabricator.kde.org/D19715#429973 if it's documented like this, we can keep it. Tho, I'd wonder if anyone uses -c without -b? Anyway, back to malachy1681 report. spectacle -bnc doesn't work on 19.12.2 (tested on my machine). Works on 20.03.70 This one didn't make it into v19.xx.x? https://phabricator.kde.org/R166:02f51eb2652fff0cc3471cf5cf3df73d214641c2
This one has been fixed, but not sure what commit it was. Can you test again with the latest Spectacle? Thanks. (In reply to Frederick Zhang from comment #0) > STEPS TO REPRODUCE > 1. Run spectacle --background --clipboard --region --nonotify > 2. Select a region, confirm > > OBSERVED RESULT > The screenshot does not get copied to clipboard. And another side effect I > noticed was that the desktop seemed to be frozen after the screenshot for a > few seconds (roughly the same as how long a notification stays on screen > when Spectacle is called without --nonotify), during which I cannot call > KRunner, cannot pop up Latte Dock, etc. > > EXPECTED RESULT > The screenshot is sent to clipboard. > > SOFTWARE/OS VERSIONS > Linux/KDE Plasma: Arch Linux > KDE Plasma Version: 5.16.4-1 > KDE Frameworks Version: 5.61.0-1 > Qt Version: 5.13.0-7
Yes I can confirm this has been fixed! Thank you! (In reply to Antonio Prcela from comment #15) > This one has been fixed, but not sure what commit it was. > Can you test again with the latest Spectacle? Thanks. > > (In reply to Frederick Zhang from comment #0) > > STEPS TO REPRODUCE > > 1. Run spectacle --background --clipboard --region --nonotify > > 2. Select a region, confirm > > > > OBSERVED RESULT > > The screenshot does not get copied to clipboard. And another side effect I > > noticed was that the desktop seemed to be frozen after the screenshot for a > > few seconds (roughly the same as how long a notification stays on screen > > when Spectacle is called without --nonotify), during which I cannot call > > KRunner, cannot pop up Latte Dock, etc. > > > > EXPECTED RESULT > > The screenshot is sent to clipboard. > > > > SOFTWARE/OS VERSIONS > > Linux/KDE Plasma: Arch Linux > > KDE Plasma Version: 5.16.4-1 > > KDE Frameworks Version: 5.61.0-1 > > Qt Version: 5.13.0-7
*** Bug 418983 has been marked as a duplicate of this bug. ***