🔀 Merge pull request #177 from Texas0295/v3
[FIX] tray: ensure Show Window works reliably on Linux/Wayland
This commit is contained in:
@@ -48,11 +48,12 @@ class TrayService {
|
|||||||
void handleAction(MenuItem item) {
|
void handleAction(MenuItem item) {
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'show_window':
|
case 'show_window':
|
||||||
if (appWindow.isVisible) {
|
() async {
|
||||||
appWindow.restore();
|
|
||||||
} else {
|
|
||||||
appWindow.show();
|
appWindow.show();
|
||||||
}
|
appWindow.restore();
|
||||||
|
await Future.delayed(const Duration(milliseconds: 32));
|
||||||
|
appWindow.show();
|
||||||
|
}();
|
||||||
break;
|
break;
|
||||||
case 'exit_app':
|
case 'exit_app':
|
||||||
appWindow.close();
|
appWindow.close();
|
||||||
|
Reference in New Issue
Block a user