Compare commits

..

2 Commits

Author SHA1 Message Date
LittleSheep
313ebc64cc 🔀 Merge pull request #177 from Texas0295/v3
[FIX] tray: ensure Show Window works reliably on Linux/Wayland
2025-09-12 21:07:56 +08:00
Texas0295
1ed8b1d0c1 [FIX] tray: ensure Show Window works reliably on Linux/Wayland
Avoid relying on appWindow.isVisible, which is not trustworthy under

bitsdojo on Linux/Wayland. Instead, always run show → restore → show

sequence to guarantee window is re-mapped and raised.


Signed-off-by: Texas0295<kimura@texas0295.top>
2025-09-12 13:26:15 +08:00

View File

@@ -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(); appWindow.show();
} else { appWindow.restore();
appWindow.show(); await Future.delayed(const Duration(milliseconds: 32));
} appWindow.show();
}();
break; break;
case 'exit_app': case 'exit_app':
appWindow.close(); appWindow.close();