moses-palmer / pystray

GNU General Public License v3.0
463 stars 57 forks source link

How to open the menu when left clicking the stray icon on Windows #100

Closed xfangfang closed 2 years ago

xfangfang commented 2 years ago

Thank you very much for this project. On Windows, right clicking the taskbar icon will open the menu. I would like to ask how to implement left clicking the icon to open the same menu?

moses-palmer commented 2 years ago

Thank you for the kind words.

This is not easily supported, but you could try to override the method defined here, change lparam fromwin32.WM_LBUTTONUP to win32.WM_RBUTTONUP and vice versa and then call the super method.

xfangfang commented 2 years ago

Thank you very much