Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8280994

[XWayland] Drag and Drop does not work in java -> wayland app direction

    XMLWordPrintable

Details

    • 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.

      Attachments

        Issue Links

          Activity

            People

              azvegint Alexander Zvegintsev
              azvegint Alexander Zvegintsev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: