vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Linux native context menu captures all mouse input and becomes unresponsive

Open vygral opened this issue 6 months ago • 4 comments

Type: Bug Description: When you right-click on the application icon in the custom title bar, the context menu appears correctly. However, any subsequent mouse click makes the mouse unresponsive across the entire desktop until reset with Alt+Tab. Note: If you avoid mouse clicks after opening the context menu and use only keyboard navigation, everything works fine and the mouse remains functional.

Steps to reproduce:

  1. Right-click on VS Code icon in title bar (context menu appears - works fine)
  2. Click anywhere on screen → mouse becomes unresponsive across entire desktop
  3. Alt+Tab once → mouse can switch windows but cannot interact within windows
  4. Alt+Tab again (even minutes later) → mouse functionality fully restored

Environment: VS Code version: Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, 2025-06-11T15:00:50.123Z) OS: Debian Linux x64 6.1.0-37-amd64, X11 Desktop Environment: GNOME

Extensions: none

vygral avatar Jun 13 '25 17:06 vygral

I cannot reproduce this 🤔

bpasero avatar Jun 13 '25 18:06 bpasero

I have a similar problem, but the behavior on my machine is different. I am on Ubuntu (I tested in 22.04 and 25.04, same problem in both), in Wayland, and the problem only appears when VSCode is running in native wayland mode (with the --ozone-platform=wayland flag) instead of the default xwayland mode.

The problem I have is that when I open the Linux native context menu, after escaping the menu I can not use the "not native" controls anymore : the main examples is that I cannot drag the window to move it, and I cannot resize it by dragging the sides/corners. However I can still use the mouse to interact with the window content and the rest of the system.

To get the window dragging back to normal, the only 2 ways I found are

  • open the "not linux native" context menu by right clicking an empty space in the menu bar, and then after escaping the menu everything is back to normal, until I open the Linux native menu again
  • switch to another window and switch back to vscode

Here is a screencast:

https://github.com/user-attachments/assets/62faa562-239c-4c08-90dc-c06b1ad60b35

EDIT: I tried to switch to X11, and I was able to reproduce the same problem as OP, the entire system desktop (execpt fot the gnome top bar) becomes unresponsive to mouse, and by using alt-tab I can restore the mouse.

pierrebrd avatar Jun 13 '25 22:06 pierrebrd

@vygral are you also on wayland?

bpasero avatar Jun 14 '25 05:06 bpasero

I am using X11.

vygral avatar Jun 14 '25 05:06 vygral