H.NotifyIcon
H.NotifyIcon copied to clipboard
ContextMenu shows behind of Windows taskbar
Hello,
Great job!
I found one potential issue on Win10. When I click Windows logo or the search area in Windows taskbar, to open Windows menu like this:
and then try right click my application tray icon, ContextMenu is shown but behind Windows taskbar, like this:
Not sure what is the reason. I am trying to investigate it, but without any success so far. Adam
![image](https://user-images.githubusercontent.com/3002068/161367383-66fbe84e-4851-457d-b0b3-7db66c2e24fd.png)
![image](https://user-images.githubusercontent.com/3002068/161367390-16db34ef-11f8-4e43-9e23-73f6670b5807.png)
Hello, I give it a try to the latest version and the issue is still 100% replicable on my side, even with the test app, see:
To reproduce the issue:
- run the test app
- enable context icon
- click the context icon (menu will be visible properly)
- click Windows icon on the left to show the Main Windows Menu
- click the context icon again - menu will be shown behind the taskbar
The same behaviour is for balloons/tooltips.
Should I create another ticket or is it possible to re-open this one? btw. I plan to debug it on my side, but rather weekend time.
Adam
![image](https://user-images.githubusercontent.com/3002068/162136974-732fc072-9339-4682-b63e-d9e288858f20.png)
I have tested this with all the apps I have installed. Everyone behaves exactly the same. Also, the Discord and Upwork apps don't show the context menu at all in such cases. Many others have a problem with hiding the context menu in this case, because clicking outside doesn't hide it.
For now, I think that this can be deliberately bypassed by somehow setting and removing focus from Shell windows via PInvoke.FindWindow("Shell_TrayWnd", null)
and PInvoke.SetForegroundWindow
or some variation of this.
This is happening in Windows 11 as well. Version 22H2 (OS Build 22621.1848)
When you right-click the tray icon, shows correctly above the taskbar. As soon as you click on the network area or something like that, and right-click on your tray icon again, the taskbar shows above the context menu of the tray application. Doesn't matter how much you show/hide the context menu, it stays under the taskbar until you focus on another window first, then right-click your tray application then it will show above the taskbar again.
It seems like when the Windows taskbar has focus, it shows on top of any context menus thereafter.
Experiencing same issue with EA app only (so far) context menu is behind taskbar
Sign out option is partially hidden and exit (below sign out) is completely inaccessible)
@Sebastian-Hothaza Read my comment above, it is windows. Nothing anyone outside of Microsoft can do about it.