H.NotifyIcon icon indicating copy to clipboard operation
H.NotifyIcon copied to clipboard

ContextMenu shows behind of Windows taskbar

Open watsug opened this issue 2 years ago • 7 comments

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: obraz

and then try right click my application tray icon, ContextMenu is shown but behind Windows taskbar, like this: obraz

Not sure what is the reason. I am trying to investigate it, but without any success so far. Adam

watsug avatar Aug 01 '21 18:08 watsug

image I have not been able to replicate this behavior in the example application - Context Menus. I also made significant changes that may have fixed the issue. Please open it again if the problem is still there. image

HavenDV avatar Apr 02 '22 05:04 HavenDV

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:

obraz

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

watsug avatar Apr 06 '22 18:04 watsug

image I was able to repeat it. But, standard Windows applications behave the same way. The behavior is restored if you click on the zone above the Taskbar

HavenDV avatar Apr 07 '22 06:04 HavenDV

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.

HavenDV avatar Apr 07 '22 06:04 HavenDV

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.

Dooks123 avatar Jul 11 '23 15:07 Dooks123

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) image

Sebastian-Hothaza avatar Jul 17 '23 19:07 Sebastian-Hothaza

@Sebastian-Hothaza Read my comment above, it is windows. Nothing anyone outside of Microsoft can do about it.

Dooks123 avatar Jul 19 '23 07:07 Dooks123