Bug 2027569 - XWayland > Wayland: Drag and drop does not work
Summary: XWayland > Wayland: Drag and drop does not work
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: mutter
Version: 35
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Florian Müllner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-30 05:26 UTC by Alexander Zvegintsev
Modified: 2022-12-13 16:00 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 16:00:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
gcc XDnDSource.c -o XDnDSource -lX11 && ./XDnDSource (13.92 KB, text/x-csrc)
2021-11-30 05:26 UTC, Alexander Zvegintsev
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME mutter issues 2042 0 None None None 2021-11-30 17:32:01 UTC

Description Alexander Zvegintsev 2021-11-30 05:26:23 UTC
Created attachment 1844113 [details]
gcc XDnDSource.c -o XDnDSource -lX11 && ./XDnDSource

Description of problem:

Unable to perform Drag and Drop using XDND protocol from Xlib application to application running on Wayland display server natively.


How reproducible:
always

Steps to Reproduce:
1. compile attached file with "gcc XDnDSource.c -o XDnDSource -lX11 && ./XDnDSource". 
   Attached file is a simple drag source client, written using XDND protocol.
   It has single mime-type to transfer: `text-plain`.
2. try to perform drag and drop starting from black area.
3. drop to gedit, firefox, etc.
4. <fail> 

Actual results:

It fails to find any window having XdndAware property(except for apps running on XWayland), 
so it unable to perform drop action.

Expected results:
Performed drop.

Additional info:

The same example works for Ubuntu 21.04, Oracle Linux 8u5 on Wayland, but not on Fedora 35.

Comment 1 Olivier Fourdan 2021-11-30 06:21:12 UTC
Hi Alexander,

Thanks for the reproducer!

Xwayland is just an Xserver, it doesn't play any active role in DnD nor copy/paste.

The Wayland compositor itself plays the role of proxy between X11 and Wayland clients, therefore DnD or copy/paste issues usually find their root in either the client or the mutter, in the case of GNOME.

Moving to mutter.

Comment 2 Olivier Fourdan 2021-11-30 07:58:54 UTC
FWIW, I see a fairly consistent behaviour regardless on Wayland or X11 clients, the pointer turns to a question mark when hovering either Wayland or X11 windows (tried in Nautilus, gnome-terminal, for Wayland and also in X11 clients such as Google Chrome or geany running with GDK_BACKEND=x11).

In all cases the logs show:

    process_motion_drag:339 0x1600007: Sending XdndPosition: (2543,397) XdndActionCopy
    main:413 1600007: XDnDStatus will accept: 0 action: None
    main:413 1600007: XDnDStatus will accept: 0 action: None
    find_aware_window:83 0x2B4: checking window for XdndAware
    find_aware_window:83 0x600583: checking window for XdndAware
    find_aware_window:83 0x1600007: checking window for XdndAware
    find_aware_window:106 0x1600007: XA_XdndAware found

(that's a DnD onto gnome-terminal running on Wayland native, FWIW).

And the drop fails in both cases (Wayland native or X11 client).

Comment 3 Olivier Fourdan 2021-11-30 08:09:46 UTC
I can confirm the same works in mutter 40.6 (on el9) but not in mutter 41.1 (on F35).

Comment 4 Olivier Fourdan 2021-11-30 17:32:42 UTC
Ran a bisection in git and filed the issue upstream

Comment 5 Ben Cotton 2022-11-29 17:25:10 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Ben Cotton 2022-12-13 16:00:54 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.