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 +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 f7558d5..e9f2f0b 100644 --- a/xdotool.spec +++ b/xdotool.spec @@ -1,15 +1,18 @@ Name: xdotool Version: 3.20211022.1 Epoch: 1 -Release: 1%{?dist} +Release: 11%{?dist} Summary: Fake keyboard/mouse input -License: BSD +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-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 +BuildRequires: libXtst-devel, libX11-devel, libXinerama-devel, libXi-devel, perl-podlators, libxkbcommon-devel %description This tool lets you programmatically (or manually) simulate keyboard input @@ -31,6 +34,7 @@ developing applications that use libxdo %prep %setup -q +%patch 0 -p1 %build %set_build_flags @@ -59,6 +63,37 @@ chmod 0644 examples/ffsp.sh %doc examples %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 1:3.20211022.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Sat Jan 17 2026 Fedora Release Engineering - 1:3.20211022.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Fri Jul 25 2025 Fedora Release Engineering - 1:3.20211022.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sun Jan 19 2025 Fedora Release Engineering - 1:3.20211022.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Sep 04 2024 Miroslav Suchý - 1:3.20211022.1-7 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 1:3.20211022.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 1:3.20211022.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Aug 16 2023 Olivier Fourdan - 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 - 1:3.20211022.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 1:3.20211022.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Nov 05 2022 Orion Poplawski - 1:3.20111022.1-1 - Update to 3.20111022.1 - Use set_build_flags and make macros