-
Notifications
You must be signed in to change notification settings - Fork 28.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and drop does not work in Wayland #156723
Comments
I'm seeing the same (no drag&drop of any elements) on https://vscode.dev/ running in Chrome 103.0.5060.134 with Preferred Ozone platform set to wayland (same reason, need it for scaling). |
Same. I am using Linux+sway and I am having the exact same issue since 1.69. I can reorder tabs without any problem after downgrading to 1.68. Related issue: #83568 |
I thought it must relate to #154693, labeled as |
It's clearly related to the switch to electron18 in the last versions, using the latest release but switching the electron binary to electron17 works just fine for me |
It also effects vscode.dev which runs in the browser rather than electron? So I guess it is an issue with newer versions of Chromium. |
Can you briefly explain how you run it with electron17? I tried to just set the version to latest 17 in the package.json but the build failed. |
For what it's worth, I can also reproduce this bug (on sway) but only when the title bar style setting is set to |
Thank you very much this solved my problem! |
+1 on this issue. Although @vially's workaround works, it would be great if native title bars could be fixed as it's not ideal to have to work around this in a WM configured without title bars.
|
+1 on this. Drag-n-drop a file into vscode is currently a hit or miss on my machine. Sometimes it works, sometimes it gives out no response, sometimes it gives out a file not found error. VS Code Version: 1.70.2 |
Using an electron binary (electron20 from official archlinux repository) i tried
and it launched VSCode (with a few errors regarding native modules not compiled against Runs successfully under wayland and drag-and-drop seems to work. But |
For me with the official build, drag&drop works mostly fine, except for certain operations. Drag & drop selection = OK |
Same on Manjaro Gnome 45.2. 18 months and it's still not fixed, a joke. |
I'm also seeing an issue like this with Plasma 6 RC2 on Wayland. Running vscode on XWayland does seem to work, but has other issues (like rendering glitches). A few things like text do work, but I can't drag a tab. When I try, VSCode acts like it's working (you get the 'shine' that indicates the tab will get tiled, for example). But when I release my mouse, nothing happens. The about window has the following:
|
Having the same Problem on Plasma 6.0 Version: 1.86.2 I can drag Stuff, but when releasing (for example having 2 files side by side) nothing happens. |
FYI: the same happens when i have a file
and starting the chrome browser. the browser now runs native wayland and i cannot drag/drop any links inside chrome. removing the settings moves chrome back to x11 and drag/drop works again. |
@deepak1556 I am pretty sure you opened vscode as xwayland client, rather than a native wayland client while testing and confirming that it works. Yes, it works as an x11 client, but this issue is about drag/drop for the wayland client. Please make sure your vscode is properly closed, and then open it using And once you made sure it is a wayland client, re-test drag and dropping a panel from the left to the right side. edit: I am saying this because I just had someone on gnome test this with a wayland client, and drag and drop does not work for them. |
The same issue on KDE 6 Wayland. Setting |
I can confirm the same. KDE Plasma 6 on Wayland, Electron v27.3.5. |
FYI: there is a issue in KDE's bugzilla which i think is the same problem. https://bugs.kde.org/show_bug.cgi?id=482142 so i think this is not really a VSCode problem (at least when using plasma6). |
Just in case there is any doubt: I'm using the Wayland version of Visual Studio Code (verified through looking glass) in GNOME 45.4 and it's also a problem for me. I can't drag and drop docks around nor reorder cells in notebooks because of this. |
FYI: Today i got updates for my system (Arch), now i have plasma 6.0.2 and also new vscode, and now drag/drop works with wayland |
@ulrichSchreiner did you test dragging a panel from one side to the other? Because that still doesn't work on my arch: 2024-03-14.11-27-45.mp4 |
@phisch you're right. i only tested drag/drop of files/editors, not drag/drop of panels. this still does not work in pure wayland, only as X11 window. |
I've just tried it on my system and it works fine. I'm KDE Plasma 6.0.2 and Code running as a Wayland (with Screencast_20240314_125634.webm |
the real funny part: it works for me too when i drag the view outside of vscode, move it over my desktop and then drop it to the right (or left). |
I can confirm what is being said above. I found https://invent.kde.org/plasma/kwin/-/commit/61f65ce98d5dd0e8956a06f9f5f88a1aa0592f5f in the changelog for Plasma 6.0.2, which I believe could possibly be related. |
Does not seem to be a workaround from Plasma, it started working on Sway for me as well. |
I was hoping this would also work with |
Seeing this struggle on Wayland using Hyprland as well, took a lot of time to figure out why this was happening, but toggling the flags does enable X11 and allow me to move things (admittedly the text is unreadable on X11). |
It works vscode 1.90.0 --enable-features=UseOzonePlatform --ozone-platform=wayland Edit: It only works if you carry it over the desktop, if you carry it through a window, for example firefox, then no |
This issue is tagged as |
I just wanted to report, that after switching from sway to niri, drag and drop seems to work flawlessly: 1723641563.mp4So this might be related to sway. |
@phisch are you 100% sure it is not running under Xwayland? It doesn't even work under GNOME for me, do it's a bit surprising it would work under a smaller compositor? |
Yes, I am 100% sure. Just double checked, it is a native wayland client. I also would have noticed because I recorded that on a system with fractional scaling, and if it was an X11 client, it would be blurry. Works flawlessly on niri (smithay based wayland compositor). |
@phisch Thanks! Just confirmed too. |
@ulrichSchreiner, thanks for the workaround, lol. The only way to get things moving right now I guess... `inxi -SG`:System:
Host: P429-nixos Kernel: 6.10.3 arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.1.4 Distro: NixOS 24.11 (Vicuna)
Graphics:
Device-1: Intel Alder Lake-P GT1 [UHD Graphics] driver: i915 v: kernel
Device-2: Generic Integrated Camera driver: uvcvideo type: USB
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.2
compositor: kwin_wayland driver: gpu: i915 resolution: 2240x1400~60Hz
API: Vulkan v: 1.3.283 drivers: N/A surfaces: xcb,xlib,wayland
API: EGL Message: EGL data requires eglinfo. Check --recommends. |
Currently, I'm using
|
You can directly run the original VSCode executable instead of the wrapper script provided by Arch to run VSCode without arguments. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
--enable-features=UseOzonePlatform --ozone-platform=wayland
to code-flags.confI am unable to re-order windows, create multiple panes with drag and drop, etc
It works if I do not add the flags. The issue is I need the flags for scaling in Wayland.
The text was updated successfully, but these errors were encountered: