Right-click Menu Opens Offscreen when Taskbar is on Left Side of Display

Hello,

There is an issue with the right-click taskbar menu if your taskbar (Start Menu bar) is docked on the left hand side of the screen.
The context menu opens to the left of the cursor (in Windows 10), which, if your taskbar is located along the left edge of the screen, pushes the menu offscreen
If there is no display to the left of the current display, the menu is drawn completely offscreen (I only noticed it because it was changing some colours slightly on my taskbar items).

This seems to only happen if the taskbar is located along the left side - if it’s along the bottom, right, or top, the menu opens on the same display as the taskbar.

Testing some other applications in my taskbar tray, their context menus seem to all have the “open to the left of the cursor” behaviour. However, when the taskbar is along the left edge and I open a context menu from these other apps, the menu seems to move right by it’s own width before opening as part of some “edge of screen” detection (even when there is a display located to the left of the current display).

Note that the DPI scaling for both of my displays, which are at the same resolution of 1920x1080, is 100%.

I have been having this issue for some time, but did not note the context menu shoving offscreen until I recently swapped primary displays in Windows - I had chalked it up to other unresolved issues I found in these forums, where people simple worked around the problem by using the context-menu within Windows Explorer directly to make changes.

Thanks,
Brian

Hi @brianbtheitguy,
I am investigating this. I haven’t been able to reproduce the effect yet, so I want to make sure I am duplicating your scenario.

It sounds like you are setup like the screenshot below, except the menu is positioned to the left of the mouse cursor instead of the right. Is that correct?

Thanks for the response. Your screenshot/description are mostly accurate - it’s not that it appears “to the left” of the cursor. It’s that it is shifted completely over onto the DISPLAY that is to the left of the cursor.

I’ve some further testing based on your response and it seems that this is related to something a bit buggy in Windows as well.

When I have 2x displays and orient them left/right in an extended manner, and make the right monitor the primary, then right-clicking on the oDrive icon pushes the menu on to the left screen.

When I turn off the leftmost display, Windows “realizes” I am not only using 1 display, but seems to be reporting something slightly different…using AdvancedRun from Nirsoft (https://www.nirsoft.net/utils/advanced_run.html), I forced Notepad to open in the top left corner of the left monitor, then turned the display off and after windows re-oriented itself, opened Notepad again - it opened offscreen (using right-click->move on the , I was able to determine it opened in the same position on the now-gone display.

I think this is an issue related to the fact that I am consistently swapping my displays around by adjusting the inputs (I have 3x docks on my desk and a fancy Logitech MK720), and so Windows isn’t reporting the screen edge properly to your software after adjusting the display layout.

As my results were very “hit or miss” in much of this, I would surmise that MS is simply doing a bad job of writing out the screen orientation somewhere and it’s reporting bad data to your app.

THAT BEING SAID…

There still does seem to be an issue of the menu moving to the other monitor when it is there, though.

If I have the left/right monitors set up in extended orientation, and the right monitor is the primary display, then the right-click menu for oDrive appears on the left monitor (at the far right side, “next to” the pointer). The bigger issue with that is that I often remotely control this computer, and so only see one display at a time.

Anyway, thanks for spending the time to look into this.

Cheers,
Brian

Thanks @brianbtheitguy! I appreciate the details.

I took a look at the current code and we don’t perform any manual placement or orientation of the menu, currently. Instead we rely on the underlying Microsoft framework to take care of that.

I have created an Engineering item for this behavior.

Does it make any difference if the odrive tray icon is set to always be visible? (Taskbar settings -> Select which icons appear on the taskbar -> Turn on for odrive)

Yess i agree with you this is great infomation.