Description
When implementing a tray-based application with multi-window support, the main window's onWindowBlur event handler stops functioning after the following sequence:
-
Main window is active with working onWindowBlur
-
Main window is hidden using windowManager.hide()
3.Multi-window is opened
-
User closes multi-window
-
User clicks tray icon to show main window again
-
onWindowBlur no longer functions on the main window
Steps to Reproduce:
-
Start application with main window
-
Open settings/other window using multi-window, hide the main window first before showing the multi-window:
static Future openWindow() async {
await windowManager.hide();
final window = await DesktopMultiWindow.createWindow()
} -
Close the multi-window
-
Click tray icon to show main window
-
Try to click outside the main window - onWindowBlur doesn't trigger