Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Spectacle Spectacle
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GraphicsGraphics
  • SpectacleSpectacle
  • Merge requests
  • !210

Clean up shutdown process, fix closing too early or not closing at all

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Noah Davis requested to merge work/ndavis/shutdown into master Mar 03, 2023
  • Overview 0
  • Commits 4
  • Pipelines 5
  • Changes 8

08d23305: Create windows with custom unique_ptrs with deleter via makeUnique()

Windows will be deleted by QWindow::close() instead of default deletion.

884323b7: Add CaptureWindow::instances() and ViewerWindow::instance()

Use these instead of m_viewerWindow and m_captureWindows in SpectacleCore. CaptureWindow::instances() automatically grows and shrinks when capture windows are created or closed. It's too much work to ensure that m_captureWindows only contains unique_ptrs that aren't null after QWindow::close() has been called.

fc2d6251: Use QEventLoopLocker to keep Spectacle alive for notifications

Stopped using setQuitOnLastWindowClosed(false) because setting it true or false depending on the situation was too complex. Now we just create a QEventLoopLocker when we make a notification and destroy the event loop locker, which also automatically quits the application, when the notification is destroyed. To close the windows, we use SpectacleWindow::closeAll() instead of making them hidden. This automatically closes Spectacle when the QEventLoopLocker has not been created.

BUG: 466143 BUG: 450001

44e3fbd4: Don't close Spectacle until the last notification is destroyed

Some notifications can have shorter timeouts and we don't want to close Spectacle before all notifications have expired or been closed.

Edited Mar 04, 2023 by Noah Davis
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/ndavis/shutdown