RFR: 8280990: [XWayland] XTest emulated mouse click does not bring window to front.

Alexander Zvegintsev azvegint at openjdk.org
Tue May 28 02:32:21 UTC 2024


Some of the modal tests fail in X11 compatibility mode on Wayland, because a mouse click emulated with XTEST does not not cause the windows to be reordered.

This is a known limitation because these click events do not leave the XWayland server and are not reported to the Wayland compositor.

There is a [libei](https://gitlab.freedesktop.org/libinput/libei) that can be used to emulate input events in Wayland.
And there is a [bridge that allows emulated events from XTEST to be passed to the compositor](https://gitlab.freedesktop.org/libinput/libei/-/blob/main/README.md?ref_type=heads#xwayland-and-xtest).
Support for this has been added in [Gnome 45 and XWayland 23.2](https://gitlab.gnome.org/GNOME/mutter/-/issues/3194#note_1937109), but it is optional and not yet enabled in Ubuntu.

This change adds `toFront` calls for mouse clicks that are only intended to bring a window to the front in the window stacking order.

The testing is green on all platforms.

-------------

Commit messages:
 - 8280990: [XWayland] XTest emulated mouse click does not bring window to front.

Changes: https://git.openjdk.org/jdk/pull/19417/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19417&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8280990
  Stats: 27 lines in 3 files changed: 23 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/19417.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19417/head:pull/19417

PR: https://git.openjdk.org/jdk/pull/19417


More information about the client-libs-dev mailing list