public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Olivier Fourdan <ofourdan@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/xdotool] epel10: Use XTEST instead of XWarpPointer with a single screen
Date: Tue, 29 Sep 2026 22:02:00 GMT [thread overview]
Message-ID: <179071932059.1.13912947840981050273.rpms-xdotool-619485d084d0@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/xdotool
Branch : epel10
Commit : 619485d084d050ad944eb4195b7d9adcf6f2100f
Author : Olivier Fourdan <ofourdan@redhat.com>
Date : 2023-08-16T10:28:20+02:00
Stats : +58/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/xdotool/c/619485d084d050ad944eb4195b7d9adcf6f2100f?branch=epel10
Log:
Use XTEST instead of XWarpPointer with a single screen
Upstream PR:
https://github.com/jordansissel/xdotool/pull/435
That allows to use xdotool with Xwayland and libEI.
---
diff --git a/0001-Use-XTEST-instead-of-XWarpPointer-with-a-single-scre.patch b/0001-Use-XTEST-instead-of-XWarpPointer-with-a-single-scre.patch
new file mode 100644
index 0000000..f20a1b6
--- /dev/null
+++ b/0001-Use-XTEST-instead-of-XWarpPointer-with-a-single-scre.patch
@@ -0,0 +1,50 @@
+From 89731d7eeb1515ebb217a59b8ca1c271e29ea0c5 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Mon, 7 Aug 2023 10:20:08 +0200
+Subject: [PATCH] Use XTEST instead of XWarpPointer with a single screen
+
+xdotool uses the XTEST extension for pretty much all input events
+emulation except for mousemove.
+
+For mousemove, it uses XWarpPointer() instead, to work around an old bug
+from 2009 that would ignore the screen number in Zaphod mode.
+
+Unfortunately, that prevents mousemove to work in Xwayland with libEI
+because Xwayland wires XTEST to libEI, whereas xdotool uses the core
+protocol for that command alone.
+
+Zaphod mode is nowadays somehow deprecated, GNOME and GTK have dropped
+support for it and Xwayland supports only one X11 screen (not to be
+confused with multi-monitors), so this workaround in xdotool actually
+causes more harm that good in most current cases nowadays.
+
+So, to preserve compatibility with Zaphod mode while being compatible
+with modern windowing systems, this fix limits the workaround that uses
+XWarpPointer() for when there is more than one screen, and uses the
+XTEST extension otherwise.
+---
+ xdo.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/xdo.c b/xdo.c
+index ffb0333..8cda05c 100644
+--- a/xdo.c
++++ b/xdo.c
+@@ -804,8 +804,12 @@ int xdo_move_mouse(const xdo_t *xdo, int x, int y, int screen) {
+ * seem to recommend XWarpPointer instead, ie;
+ * https://bugzilla.redhat.com/show_bug.cgi?id=518803
+ */
+- Window screen_root = RootWindow(xdo->xdpy, screen);
+- ret = XWarpPointer(xdo->xdpy, None, screen_root, 0, 0, 0, 0, x, y);
++ if (screen > 0) {
++ Window screen_root = RootWindow(xdo->xdpy, screen);
++ ret = XWarpPointer(xdo->xdpy, None, screen_root, 0, 0, 0, 0, x, y);
++ } else {
++ ret = XTestFakeMotionEvent(xdo->xdpy, 0, x, y, CurrentTime);
++ }
+ XFlush(xdo->xdpy);
+ return _is_success("XWarpPointer", ret == 0, xdo);
+ }
+--
+2.41.0
+
diff --git a/xdotool.spec b/xdotool.spec
index 814d598..42a6502 100644
--- a/xdotool.spec
+++ b/xdotool.spec
@@ -1,12 +1,14 @@
Name: xdotool
Version: 3.20211022.1
Epoch: 1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Fake keyboard/mouse input
License: BSD
URL: https://github.com/jordansissel/xdotool
Source0: https://github.com/jordansissel/xdotool/releases/download/v%{version}/xdotool-%{version}.tar.gz
+Patch0: 0001-Use-XTEST-instead-of-XWarpPointer-with-a-single-scre.patch
+
BuildRequires: make
BuildRequires: gcc
BuildRequires: libXtst-devel, libX11-devel, libXinerama-devel, libXi-devel, /usr/bin/pod2man, libxkbcommon-devel
@@ -31,6 +33,7 @@ developing applications that use libxdo
%prep
%setup -q
+%patch 0 -p1
%build
%set_build_flags
@@ -59,6 +62,10 @@ chmod 0644 examples/ffsp.sh
%doc examples
%changelog
+* Wed Aug 16 2023 Olivier Fourdan <ofourdan@redhat.com> - 1:3.20211022.1-4
+- Use XTEST instead of XWarpPointer with a single screen
+ https://github.com/jordansissel/xdotool/pull/435
+
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.20211022.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
reply other threads:[~2026-09-29 22:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179071932059.1.13912947840981050273.rpms-xdotool-619485d084d0@fedoraproject.org \
--to=ofourdan@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox