Hi, thanks for the crate.
We are seeing a Windows-specific tray menu issue in a Tauri 2 app that uses the current tray stack (tauri -> tray-icon).
Summary:
After launching the app from the Windows Start Menu, the tray icon context menu can appear behind the Windows taskbar / taskbar shell instead of above it. Normal launches do not seem to trigger this as reliably.
What we observed:
- Launching the app from Explorer works normally
- Launching the app from the Windows Start Menu can leave tray context menus in a bad z-order state
- This does not only affect our tray icon consistently; it can seem to disturb tray menu behavior more generally until the shell state settles
- We can still reproduce normal app focus handback separately, so this does not look like only a generic focus-restore bug in our app
Environment:
- Windows 11
tauri 2.10.3
tray-icon 0.21.3
- App starts hidden/in tray and eagerly creates a hidden popup window for low first-use latency
Relevant shell details we observed while debugging:
- Start Menu launch foreground window class:
ApplicationManager_DesktopShellWindow
- Tray helper foreground window class during tray interaction:
tray_icon_app
- We also saw taskbar/flyout-related shell classes such as
Shell_TrayWnd and XamlExplorerHostIslandWindow_WASDK
Why I think this may belong in the tray stack:
From the Windows docs, notification-area menu handling usually requires:
SetForegroundWindow(hwnd)
TrackPopupMenu(...)
- posting a benign
WM_NULL after the menu interaction
In tray-icon's Windows implementation, I can see SetForegroundWindow(hwnd) and TrackPopupMenu(...), but I do not see the usual WM_NULL follow-up. I�m not certain this is the root cause, but it seems like the clearest standards gap.
Relevant docs:
Questions:
- Is this a known Windows shell edge case around Start Menu launches?
- Should
tray-icon post WM_NULL after TrackPopupMenu on Windows?
- Is there already a preferred workaround for apps that start from the Start Menu directly into the tray?
If helpful, I can also provide a minimal reproduction app.
Hi, thanks for the crate.
We are seeing a Windows-specific tray menu issue in a Tauri 2 app that uses the current tray stack (
tauri->tray-icon).Summary:
After launching the app from the Windows Start Menu, the tray icon context menu can appear behind the Windows taskbar / taskbar shell instead of above it. Normal launches do not seem to trigger this as reliably.
What we observed:
Environment:
tauri2.10.3tray-icon0.21.3Relevant shell details we observed while debugging:
ApplicationManager_DesktopShellWindowtray_icon_appShell_TrayWndandXamlExplorerHostIslandWindow_WASDKWhy I think this may belong in the tray stack:
From the Windows docs, notification-area menu handling usually requires:
SetForegroundWindow(hwnd)TrackPopupMenu(...)WM_NULLafter the menu interactionIn
tray-icon's Windows implementation, I can seeSetForegroundWindow(hwnd)andTrackPopupMenu(...), but I do not see the usualWM_NULLfollow-up. I�m not certain this is the root cause, but it seems like the clearest standards gap.Relevant docs:
Questions:
tray-iconpostWM_NULLafterTrackPopupMenuon Windows?If helpful, I can also provide a minimal reproduction app.