Details
-
Bug
-
Resolution: Fixed
-
P3
-
internal, 21
-
b26
Description
It is not possible to perform Drag and Drop in java -> wayland direction.
Root cause:
When we are trying perform DnD operation from XWayland to native Wayland window, it provides some dummy window under the cursor.
From my testing it is always has 0x600002 id:
$ xprop -id 0x600002
XdndAware(ATOM) = BITMAP
It has only XdndAware property and nothing else. But our code is picky when it is selecting the target window:
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java#L399
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XlibUtil.java#L318
It only accepts windows only with WM_STATE property set, so it prevents drag to initiate.
Accepting this window from Wayland allows to perform drop.
Root cause:
When we are trying perform DnD operation from XWayland to native Wayland window, it provides some dummy window under the cursor.
From my testing it is always has 0x600002 id:
$ xprop -id 0x600002
XdndAware(ATOM) = BITMAP
It has only XdndAware property and nothing else. But our code is picky when it is selecting the target window:
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java#L399
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XlibUtil.java#L318
It only accepts windows only with WM_STATE property set, so it prevents drag to initiate.
Accepting this window from Wayland allows to perform drop.
Attachments
Issue Links
- is cloned by
-
JDK-8281612 [XWayland] DnD drop performs to a wrong window from X11 client on Wayland
- Closed