Skip to content

fix(windows): Windows tray context menu can appear behind the taskbar after launching from Start Menu (#303)#311

Merged
amrbashir merged 2 commits into
tauri-apps:devfrom
Fullzoon:dev
Apr 30, 2026
Merged

fix(windows): Windows tray context menu can appear behind the taskbar after launching from Start Menu (#303)#311
amrbashir merged 2 commits into
tauri-apps:devfrom
Fullzoon:dev

Conversation

@Fullzoon

Copy link
Copy Markdown
Contributor

Problem

Fixes #303: tray context menu appears behind the taskbar when launching from Windows Start Menu.

Root Cause

Per TrackPopupMenu docs, the calling window must be foreground before displaying a tray context menu.

Solution

  • Change WM_RBUTTONDOWN to WM_RBUTTONUP for menu trigger
  • Post WM_NULL after menu displays (as suggested in MSDN)

Testing

✅ Verified on Windows 10:

  • Start Menu launch → menu above taskbar
  • Desktop/.exe launch → no regression
  • Multiple consecutive opens → no disappearance

Fixes #303

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, LGTM, can you just add a change file in .changes directory

---
"tray-icon": patch
---

On Windows, fix ...

@Fullzoon

Copy link
Copy Markdown
Contributor Author

谢谢你的PR,LGTM,你能不能在目录里添加一个更改文件.changes

---
"tray-icon": patch
---

On Windows, fix ...

谢谢你的PR,LGTM,你能不能在目录里添加一个更改文件.changes

---
"tray-icon": patch
---

On Windows, fix ...

Added the change file in .changes.

@amrbashir amrbashir merged commit 7e5953c into tauri-apps:dev Apr 30, 2026
10 checks passed
@amrbashir

Copy link
Copy Markdown
Member

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows tray context menu can appear behind the taskbar after launching from Start Menu

2 participants