On Thu, 1 Jun 2023 15:18:55 GMT, Alexander Zvegintsev <[email protected]>
wrote:
> This change resolves the issue that drag and drop from a Java application to
> a native Wayland application (such as gedit) is not possible on Linux.
>
> Our code it quite picky for the drop target, and requires it to be a top
> level window with the WM_STATE property set, whereas the XWayland server
> provides dummy windows without this property.
> So now we make an exclusion for this case.
>
> After the fix it successfully passes previously failed related manual
> jtreg/conformance tests on Wayland.
> Other tests are also passed.
src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java line 408:
> 406: */
> 407: private static boolean isXWaylandDndAwareWindow(long window) {
> 408: if (Toolkit.getDefaultToolkit() instanceof SunToolkit sunToolkit
So if it is NOT an instance of sunToolkit .. then you carry on to the code that
gets the property.
Is that what you meant to happen ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14266#discussion_r1213464984