Skip to content

Add Restart and Exit actions to tray icon menu - #10

Closed
Yanitwei wants to merge 1 commit into
OpenMouse-Project:mainfrom
Yanitwei:tray-context-menu
Closed

Yanitwei wants to merge 1 commit into
OpenMouse-Project:mainfrom
Yanitwei:tray-context-menu

Conversation

@Yanitwei

Copy link
Copy Markdown
Contributor

Summary

Adds a native context menu to the system tray icon with:

  • Restart
  • Exit

Details

  • Preserves existing left-click behavior for showing and hiding the tray window.
  • Reuses the application's existing graceful shutdown path for Exit.
  • Implements Restart by relaunching the current executable after shutdown.
  • Keeps updater-driven restart behavior separate to avoid duplicate launches.

Testing

Tested on Windows:

  • Application builds successfully.
  • Tray icon appears normally.
  • Left-click continues to toggle the window.
  • Right-click displays the context menu.
  • Exit closes the application cleanly.
  • Restart closes and relaunches the application successfully.

@snekxs

snekxs commented Oct 3, 2026

Copy link
Copy Markdown
Member

Superseded by #14 (same change, rebased onto current main plus a clippy fixup for the 8-arg constructor — your fork was behind main and I can't push to it). #14 is merged. Closing this one.

@snekxs snekxs closed this Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants