Summary: | Spectacle sometimes does not return to the shell prompt | ||
---|---|---|---|
Product: | [Applications] Spectacle | Reporter: | null <null> |
Component: | General | Assignee: | Boudhayan Gupta <me> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | akontsevich, antonio.prcela, bugseforuns, kapillamba4, mail, nate |
Priority: | VHI | Keywords: | usability |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/spectacle/e98249c30917ef84f3f982b29c33dc90714fdb45 | Version Fixed In: | 19.08.2 |
Sentry Crash Report: |
Description
null
2018-01-31 14:27:37 UTC
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 |