feat: tray logic in windows

This commit is contained in:
Kingtous
2022-11-02 11:10:28 +08:00
parent 5c8639c603
commit 892869c014
3 changed files with 18 additions and 10 deletions

View File

@@ -399,7 +399,15 @@ class _DesktopHomePageState extends State<DesktopHomePage>
@override
void onTrayIconMouseDown() {
windowManager.show();
windowManager.focus();
}
@override
void onTrayIconRightMouseDown() {
// linux does not support popup menu manually.
// linux will handle popup action ifself.
if (Platform.isMacOS || Platform.isWindows) {
trayManager.popUpContextMenu();
}
}
@override