Skip to content
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

Dragon doesnt work on Sway #72

Open
HappyCthulhu opened this issue Apr 7, 2024 · 2 comments
Open

Dragon doesnt work on Sway #72

HappyCthulhu opened this issue Apr 7, 2024 · 2 comments

Comments

@HappyCthulhu
Copy link

Hello. I switched to sway few weeks ago. Im in love with CLI-tools, that allow me to drag&drop from CLI, but im expiriencing troobles with that on Wayland. Drag window shows up, but i cant drop anything. Sometimes i can, sometimes - cant. Can u suggest some solution for me? Or, at least, tell me, how to debug it properly.

Also, your app gives me error:

(dragon:161804): Gdk-WARNING **: 14:59:50.047: Error writing selection data: Error writing to file descriptor: Broken pipe

If this error is related to my bug - how can i enable moving popups? Is that even possible?

Demonstration:

2024-04-07.14-57-31.mp4
@trinitronx
Copy link

trinitronx commented Sep 9, 2024

Similar to vimpostor/blobdrop#5, it appears that this is an issue with the drop target (google-chrome in this case) running under XWayland, meanwhile dragon-drop is running in native Wayland mode.

Edit: Given the other two issues you opened (#72 nik012003/ripdrag#43), I suspect that this is not an issue in blobdrop but rather with Chrome running in XWayland, while blobdrop is running in native Wayland mode.
If that is the case, you can either try starting Chrome in native Wayland mode, or alternatively blame the Wayland folks for still not having fixed DnD between XWayland and Wayland in 2024.

-- vimpostor commented on Apr 7, 2024

If you have further issues with drag & drop between applications, you can verify if any are running under XWayland with:

# Utility from Arch Linux package: extra/xorg-xlsclients
# sudo pacman -Sy xorg-xlsclients

xlsclients

FWIW: I've been able to reproduce this issue by trying to drag & drop from dragon-drop to another app running under XWayland:

(dragon-drop:2096045): Gdk-WARNING **: 15:49:33.100: Error writing selection data: Error writing to file descriptor: Broken pipe

@trinitronx
Copy link

trinitronx commented Sep 9, 2024

For future reference, as explained here it's possible to use the following environment variables to control which display server protocol backend is used:

Application GUI Toolkit Environment variable
GDK / GTK GDK_BACKEND
Qt QT_QPA_PLATFORM

Below is a simple key to know which variable to set for a given client application to force either X11 or Wayland display server backend.

Support Matrix:

Application GUI Toolkit X11 Wayland
GDK / GTK export GDK_BACKEND=x11 export GDK_BACKEND=wayland
Qt export QT_QPA_PLATFORM=xcb export QT_QPA_PLATFORM=wayland

Due to limitations of drag & drop functionality between Xorg/X11 and Wayland client applications, it's often essential1 that both applications are running under the same display server backend. Either both need to be running as X11 clients, or both need to be Wayland clients. (for best results)

Footnotes

  1. Intended as a general "rule of thumb", since "your mileage may vary", etc... (e.g. KWin purportedly supports this, meanwhile wlroots only supported Wayland -> XWayland DnD, leaving the other direction unimplemented until a later time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants