Closed mehmetyilmaz001 closed 2 years ago
Hey, I saw this problem as well. You can apply this change for macOS:
@objc func on_system_tray_event_callback(sender: NSStatusBarButton) {
if let event = NSApp.currentEvent {
switch event.type {
// case .leftMouseUp:
// channel.invokeMethod(kSystemTrayEventCallbackMethod, arguments: kSystemTrayEventLButtnUp)
default:
channel.invokeMethod(kSystemTrayEventCallbackMethod, arguments: kSystemTrayEventRButtnUp)
statusItem?.menu = statusItemMenu
statusItem?.button?.performClick(nil)
}
}
}
I haven't poked around the Windows code yet but I'm assuming there's a similar fix that can be applied.
Threw a slightly different fix for mac and windows into a fork: https://github.com/LucianoLaratelli/system_tray
Haven't looked at Linux yet
Looks like this might be a better replacement: https://github.com/leanflutter/tray_manager
pls try v0.0.9
Hi,
Is there any way to show context menu when click left mouse button.
Thnx