Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
On certain multi-monitor configurations (mine looks like ), the tray icon menu appears offscreen (this is monitor 1, the one on the lower right):
There may also be some related problems with the entire window appearing offscreen, but I haven't observed that directly.
Cause
We have logic to "clamp" the menu's area to be on-screen (see #2587, shared with the window position restoration code, see #2677), but currently the
Top
andLeft
properties are switched, so the position won't get adjusted if theY
value is greater than theLeft
position of the screen.Changes
Now we compare
X
toLeft
andY
toTop
, and the menu appears onscreen: