feat: add double-click support for tray icon
Adds double click support to open application from system tray.
Tested locally on Windows NOT tested on MacOS. Code for that is experimental. Would be neat if someone on MacOS could verify that it works. Ref. discussion #368
Simple GIF demo:
I dont know if this is desired behaviour, as the auther hasn't expressed any opinions on this. Feel free to reject if this is out of scope for the application 😊 Disclaimer; the code changes was made partially with AI support.
Hm is the manual click tracking necessary considering Tauri has the built in double click event?
Hm is the manual click tracking necessary considering Tauri has the built in double click event?
I tried with the double click event, but it fired for a single click then for me 🤔
This doesn't seem to change any behaviour on macOS, which is probably correct because I wouldn't expect a menubar item to open an app's settings window. The current behaviour (opening a menu) is pretty normal for this kinda app.
Yea for macOS I don't think apps usually have a double click event in the top tray thing. It's mostly a windows thing but pretty common.
I tried with the double click event, but it fired for a single click then for me 🤔
Do you mean the menu shows with a single left click, or it made it fire the double-click app just when left clicking once?
@olejsc If the former I bet it is because of this line: https://github.com/cjpais/Handy/pull/369/files#diff-eabcebd0ae5c9b77a5247e1bdbdb88b1869fc0c932d0ef0cf2ecf9ee5221be7cL157
.show_menu_on_left_click(true)
Even if it's the latter it might be interfering with the event somehow. Probably better to just set that to false in any case, if the double left click event is added. I assume right click will still show the menu.
@olejsc would be nice if you could try @ThioJoe suggestion, i think it would be preferable
@olejsc would be nice if you could try @ThioJoe suggestion, i think it would be preferable
Will do when i have some time. Hopefully this weekend.