Skip to content

feat: show tray menu only on right click#408

Merged
Splode merged 1 commit into
Splode:mainfrom
SeanTong11:feat/tray-left-click-menu
Apr 27, 2026
Merged

feat: show tray menu only on right click#408
Splode merged 1 commit into
Splode:mainfrom
SeanTong11:feat/tray-left-click-menu

Conversation

@SeanTong11

Copy link
Copy Markdown
Contributor

Summary

This updates the tray icon interaction so left click toggles the main window visibility, while the tray context menu is reserved for
right click.

Background

Discussed in #405.

The proposed behavior matches the more common Windows tray pattern:

  • Left click: show/hide the main window
  • Right click: open the tray menu

Changes

  • Adds .show_menu_on_left_click(false) to the tray icon builder.
  • Keeps the existing left-click window visibility toggle.
  • Keeps the tray menu available through right click.

Testing

Tested manually on Windows:

  • Left-clicking the tray icon restores the main window.
  • Left-clicking the tray icon again hides the main window.
  • Left-clicking the tray icon does not open the tray menu.
  • Right-clicking the tray icon opens the tray menu.

Platform notes

As noted in #405:

  • macOS may ignore show_menu_on_left_click(false) because tray/menu-bar click behavior is often controlled by the OS.
  • Linux AppIndicator behavior may vary by desktop environment and may not consistently distinguish left/right click.

@Splode

Splode commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Looks good! On macOS, left-click now toggles the window application, and right-click shows the menu, which I think is an acceptable behavior. Linux retains the original behavior where left and right click both show the menu.

Thanks again for another contribution!

@Splode Splode merged commit 5df01b0 into Splode:main Apr 27, 2026
5 checks passed
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