vscode
vscode copied to clipboard
Drag and drop does not work in Wayland
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.69.2
- OS Version: Manjaro Linux, Kernel: 5.15, Wayland, WM: sway
Steps to Reproduce:
- Add
--enable-features=UseOzonePlatform --ozone-platform=waylandto code-flags.conf - Open code
- Attempt to drag tabs, files, or anything else
- Does not give any indication that they are being dragged, and the elements to not get moved around
I 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.
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: https://github.com/microsoft/vscode/issues/83568
I thought it must relate to https://github.com/microsoft/vscode/issues/154693, labeled as insiders-released on AUR at least the insiders version is out of date though, so I could not test it yet.
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.
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
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 native. When using the custom title bar, drag-and-drop seems to work as expected.
For what it's worth, I can also reproduce this bug (on sway) but only when the title bar style setting is set to
native. When using thecustomtitle bar, drag-and-drop seems to work as expected.
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.
- VS Code Version: 1.70.1
- OS: Arch Linux
- Kernel version: 5.18.6
- Display protocol: Wayland
- Window manager: Sway
+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 OS: Fedora 36 Kernel version: 5.18.17-200 Display protocol: Wayland Window manager: GDM
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
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.
Using an electron binary (electron20 from official archlinux repository) i tried
electron /opt/visual-studio-code/resources/app
and it launched VSCode (with a few errors regarding native modules not compiled against NODE_MODULE_VERSION 107).
Runs successfully under wayland and drag-and-drop seems to work.
But app_id is set to "Electron". I found app.setDesktopName(string) which, when tested in a small electron app, sets the app_id to the provided string. I do not know if vscode with electron@19+ will fix this but this may be a viable solution to https://github.com/microsoft/vscode/issues/154693 ?
For me with the official build, drag&drop works mostly fine, except for certain operations.
Drag & drop selection = OK Moving tabs around = OK Creating split views from drag&drop = OK Reordering sidebar tabs = fail Moving to secondary sidebar = fail
This bug has been fixed in the latest release of VS Code Insiders!
@paarthtandon, you can help us out by commenting /verified if things are now working as expected.
If things still don't seem right, please ensure you're on version 833ac685084e2028b09753392b82c641c7025bbc of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.
Happy Coding!
~/verified~
think i made a mistake here
Closing as we will be shipping Electron 22 update with v1.78
Can you all verify once more now that 1.78 will actually ship with Electron 22?
I had trouble verifying this, passing these flags to code-insiders prevents VS Code from launching. With --verbose, there are errors in [...:ERROR:process_memory_range.cc(75)] read out of range. Passing the flags to stable Code does not cause the crash, but also I don't hit the bug on Fedora with Wayland 🤷
With --verbose, there are errors in [...:ERROR:process_memory_range.cc(75)] read out of range.
Indicates a crash, @connor4312 can you share the output from WAYLAND_DEBUG=1 code-insiders --verbose --ozone-platform=wayland.
Why the issue was closed? As the author mentioned above: Reordering sidebar tabs = fail Moving to secondary sidebar = fail
For me those actions are bugged too. Maybe we should create a separate issue for them?
disconfirming with both vscode 1.78 and insiders 1.79. I think I made a mistake earlier by not passing the right arguments to code-insiders, so I was testing the X11 version.
reordering sidebar tabs does not work, neither does secondary sidebar. both actions work fine when ozone platform is x11
Can confirm, sidebar file/folder drag crashes the whole instance of vscode. I am at v1.78.2 on Hyprland arch.
This issue is closed again? Why? In latest release it's still not fixed....
@Snarpix did you test with latest insiders https://code.visualstudio.com/insiders ?
Does not work for me either in insiders.
Some Elements I try to drag behave same as in older builds (e.g. can drag them but the do not change their location after dropping)
Other elements make the whole app crash when trying to drag them somewhere...
@mindrunner can you share a recording of the steps that demonstrate the issue you are seeing, thanks!
@deepak1556 There may be several issues at play, since the insiders release does fix the problem for me on Sway/Arch Linux. Looking forward to the next release!
@mindrunner can you share a recording of the steps that demonstrate the issue you are seeing, thanks!
Video shows dragging elements without any effect as well as crash of vscode in the end. (Dragging Explorer)
https://github.com/microsoft/vscode/assets/1413542/899334ab-b969-4df1-9ee5-386ff34d12c5
Using the new flags mentioned in Arch Wiki solved the problem for me. It's now running as a native Wayland app:
--enable-features=WaylandWindowDecorations --ozone-platform-hint=auto
Sources: https://wiki.archlinux.org/title/Visual_Studio_Code#Running_natively_under_Wayland https://wiki.archlinux.org/title/Wayland#Electron
@matthewwardrop the parameters I mentioned above no longer working since Electron version is updated to 22.5.5 in the 1.79 release either. I tried the code package in the official Arch repos (basically Code OSS), which uses Electron 22.3.3 and it works fine. Maybe Electron update broke something and that's what the issue you're having with the Insiders build.
With the Microsoft build using Electron 22.5.5, it crashes if a folder is already opened in earlier session of VS Code and title bar style setting is set to custom. But no problems with opening an empty window. Dragging and dropping also works. If title bar style setting is set to native however, no problems occur at all.
For Code OSS using Electron 22.3.3, it's working as expected with the given parameters and both title bar style settings.
@ouzdll I don't know where Electron 22.5.5 comes from :/. It doesn't seem to be a formal release. However, Electron 22.3.12 on Arch fixes this, as noted here: https://bugs.archlinux.org/task/78753