xserver: Branch 'xwayland-23.2'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 9 07:41:02 UTC 2024
hw/xwayland/xwayland-input.c | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit d755da587fdb72e78bf8ad82fca79d4c42b11cfe
Author: Warren Togami <wtogami at gmail.com>
Date: Fri Nov 24 21:03:13 2023 -0600
xwayland: Ensure pointer for gestures has buttons
X11 clients tend to assume that pointers have buttons. This
assumption means they often fail to handle the X error that
is generated when querying the button mapping of a pointer
device that lacks buttons.
This failure to handle the X error leads to those client
applications to abruptly exit.
This commit assigns vestigial buttons to the gesture pointer
device for the sole purpose of backward compatibility with
legacy X11 clients.
That technique is already employed for a different pointer,
the relative pointer device, for similar reasons, so this
just makes the legacy client compatibility more complete.
See https://gitlab.gnome.org/GNOME/mutter/-/issues/2353
(cherry picked from commit 456b0e86bb25bee8ca5ab8cae18f88d0d0731bfb)
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 67c7c151d..55385f762 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -313,6 +313,13 @@ xwl_pointer_proc_pointer_gestures(DeviceIntPtr device, int what)
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
+ /*
+ * We'll never send buttons, but XGetPointerMapping might in certain
+ * situations make the client think we have no buttons.
+ */
+ if (!init_pointer_buttons(device))
+ return BadValue;
+
if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels,
GetMotionHistorySize(), Relative))
return BadValue;
More information about the xorg-commit
mailing list