- $ spectacle - Save & Exit - "Configure Notifications" in Plasma popup, Cancel - spectacle keeps running in the shell (while I'd expect it to exit instead of hiding only) Even when not opening the config dialog, the shell prompt does not return immediately but only when the popup is hidden again. Is there any reason the popup is tied to Spectacle running in the background?
This issue also prevents the Print Screen key from calling up Spectacle when there's already an instance silently running in the background, which is really annoying (workaround: `killall spectacle`). This is caused by the following in KSMainWindow::saveAndExit(): qApp->setQuitOnLastWindowClosed(false); ExportManager::instance()->doSave(QUrl(), true); hide(); It's been implemented this way to make sure that Spectacle doesn't quit before its notification appears on the screen, but there's doubtless a better way to do this.
It looks like Spectacle tries to handle this by connecting the allDone signal (which is emitted once the notification goes away) to &Application::quit: QObject::connect(&core, &SpectacleCore::allDone, qApp, &QApplication::quit); But that doesn't actually seem to work. The following trivial diff fixes it for me: - QObject::connect(&core, &SpectacleCore::allDone, qApp, &QApplication::quit); + QObject::connect(&core, &SpectacleCore::allDone, QApplication::quit);
Patch available: https://phabricator.kde.org/D10424
*** Bug 382640 has been marked as a duplicate of this bug. ***
> - "Configure Notifications" in Plasma popup, Cancel Another way to trigger the bug: Click on the preview in the notification to open Gwenview. Note that clicking on "Open" does not trigger the bug, because there is this: QTimer::singleShot(250, this, &SpectacleCore::allDone);
There are a lot of other ways to get Spectacle to stay open by configuring the notification differently, i.e. by choosing other notification options than "Show a message in a popup". Either we always quit after a timeout, or we fix KNotification or Plasma to send a signal (destroyed/closed/ignored/activated etc.) regardless of the notification methods (which could be "None" too!).
*** Bug 391611 has been marked as a duplicate of this bug. ***
*** Bug 374864 has been marked as a duplicate of this bug. ***
More hints to solve this bug: https://phabricator.kde.org/D7971#272308
Might fix it with this one: https://phabricator.kde.org/D23534
Git commit e98249c30917ef84f3f982b29c33dc90714fdb45 by David Redondo, on behalf of Antonio Prcela. Committed on 03/09/2019 at 14:22. Pushed by davidre into branch 'Applications/19.08'. FIX: Properly close spectacle after Save As Summary: BUG: 389694 Test Plan: # run Spectacle via shell # Have Quit after Save or Copy checked. # Hit Save As and save the image # Spectacle closes Reviewers: davidre Reviewed By: davidre Subscribers: broulik, #spectacle Tags: #spectacle Differential Revision: https://phabricator.kde.org/D23534 M +2 -2 src/SpectacleCore.cpp https://commits.kde.org/spectacle/e98249c30917ef84f3f982b29c33dc90714fdb45