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

[XWayland] XTest emulated mouse click does not bring window to front

XMLWordPrintable

    • b26

        Window does not come to front on emulated mouse click.
        Affected tests:

            FAIL: java/awt/Modal/OnTop/OnTopDocModal1Test.java
            FAIL: java/awt/Modal/OnTop/OnTopDocModal2Test.java
            FAIL: java/awt/Modal/OnTop/OnTopDocModal3Test.java
            FAIL: java/awt/Modal/OnTop/OnTopDocModal4Test.java
            FAIL: java/awt/Modal/OnTop/OnTopDocModal5Test.java
            FAIL: java/awt/Modal/OnTop/OnTopDocModal6Test.java
            FAIL: java/awt/Modal/OnTop/OnTopModeless1Test.java
            FAIL: java/awt/Modal/OnTop/OnTopModeless2Test.java
            FAIL: java/awt/Modal/OnTop/OnTopModeless3Test.java
            FAIL: java/awt/Modal/OnTop/OnTopModeless4Test.java
            FAIL: java/awt/Modal/OnTop/OnTopModeless5Test.java
            FAIL: java/awt/Modal/OnTop/OnTopModeless6Test.java
            FAIL: java/awt/Modal/ToFront/FrameToFrontModeless1Test.java
            FAIL: java/awt/Modal/ToFront/FrameToFrontNonModalTest.java

        Root cause and possible solutions:

        """
        Yes, the reason is this is using XTEST, an X11 protocol which will not work outside of X11.

        In other words, the emulated input event reaches the X11 clients, but not the Wayland compositor which is the actual display server but also the X11 window manager in Wayland, the component which is in charge of moving/resizing/stacking the windows.

        You can easily observe this using xdotool and xev in Xwayland. If the emulated click occurs within the xev window, the X11 event is logged by xev, but the window is not restacked by the Wayland compositor.

        We've been working an a separate protocol to make this work, it's libEI driven by Peter Hutterer:

        https://gitlab.freedesktop.org/libinput/libei
        """

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

                Created:
                Updated:
                Resolved: