Context menu doesn't respect screen bounds
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.9k
- Forks
- 429
- PR merge metrics
- No merged PRs in 30d
Description
Note to contributors: I'm unsubscribing from this issue. If you implement a solution and want to ask a user to verify it, then please ping any of the rest of the users in this thread, thanks.
Environment
Windows build number: 10.0.22000.0
Your Distribution version: Ubuntu 21.04
Your WSLg version: 1.0.26
Steps to reproduce
Open a GUI app which supports opening context menu and right click on it. (I've checked with Nautilus and Sublime Merge.)
Expected behavior
Context menu should appear inside the screen.
Actual behavior
Context menu are not trying to position themselves inside the screen and are always opened to the right of the cursor. Screenshots are of right edge of the screen:

Nautilus

Sublime Merge
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in WSLg with Nautilus or Sublime Merge, especially when the pointer is near the right edge of the screen. Trace how WSLg handles context-menu placement and verify that menus remain fully inside the screen bounds without breaking normal placement elsewhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100