From 510ee94dc6c7b011ba95816e50d4faa8352f5e71 Mon Sep 17 00:00:00 2001 From: zorz Date: Wed, 1 Apr 2026 22:52:53 +0300 Subject: xorg --- x11-xwayland/2113.patch | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ x11-xwayland/MAKEPKG | 38 ++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 x11-xwayland/2113.patch create mode 100644 x11-xwayland/MAKEPKG (limited to 'x11-xwayland') diff --git a/x11-xwayland/2113.patch b/x11-xwayland/2113.patch new file mode 100644 index 0000000..d867629 --- /dev/null +++ b/x11-xwayland/2113.patch @@ -0,0 +1,52 @@ +From 7fb5e00ad86ca862024ad7be83c670aacf805d09 Mon Sep 17 00:00:00 2001 +From: Liu Heng +Date: Fri, 12 Dec 2025 19:34:16 +0800 +Subject: [PATCH] xwayland: Fix incorrect pointer coordinates in enter events + +Xwayland was sending incorrect pointer coordinates to X clients on +pointer enter events. + +This was caused by calling CheckMotion() with a NULL event, which +prevented the pointer sprite hot coordinates from being updated +properly. + +Fix this by constructing a proper DeviceEvent of type ET_Enter in +pointer_handle_enter, initializing it with the current timestamp +and EVENT_SOURCE_FOCUS, and passing it to CheckMotion() instead +of NULL. + +This ensures the pointer sprite coordinates are correctly updated +when the pointer enters a window. + +Part-of: +--- + hw/xwayland/xwayland-input.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c +index cd2046e1d4..447627dc63 100644 +--- a/hw/xwayland/xwayland-input.c ++++ b/hw/xwayland/xwayland-input.c +@@ -528,6 +528,7 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, + int dx, dy; + ScreenPtr pScreen = xwl_screen->screen; + ValuatorMask mask; ++ DeviceEvent enter; + + /* There's a race here where if we create and then immediately + * destroy a surface, we might end up in a state where the Wayland +@@ -558,8 +559,10 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, + (*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE); + + miPointerInvalidateSprite(master); ++ init_device_event(&enter, dev, currentTime.milliseconds, EVENT_SOURCE_FOCUS); ++ enter.type = ET_Enter; + +- CheckMotion(NULL, master); ++ CheckMotion(&enter, master); + + /* Ideally, X clients shouldn't see these button releases. When + * the pointer leaves a window with buttons down, it means that +-- +GitLab + diff --git a/x11-xwayland/MAKEPKG b/x11-xwayland/MAKEPKG new file mode 100644 index 0000000..02eb2e7 --- /dev/null +++ b/x11-xwayland/MAKEPKG @@ -0,0 +1,38 @@ +#!/bin/mkpkg +# description: X server for Wayland compatibility +# url: https://wayland.freedesktop.org/ + +name=x11-xwayland +version=24.1.9 +release=1 +depends=(wayland nettle libxfont2 libxres libxshmfence + libxtst libpixman xkbcomp) +makedeps=(meson) +source=(https://xorg.freedesktop.org/releases/individual/xserver/xwayland-$version.tar.xz + 2113.patch) + +patch() { + cd xwayland-$version + patch -p1 -i $SRC/2113.patch +} + +build() { + meson setup xwayland-$version build \ + --prefix=/usr \ + --buildtype=plain \ + -D xkb_dir=/usr/share/X11/xkb \ + -D xkb_output_dir=/var/lib/xkb + + meson compile -C build + DESTDIR=$PKG meson install -C build + + rm -f $PKG/usr/lib/xorg/protocol.txt + rm -f $PKG/usr/share/man/man1/Xserver.1 +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh -- cgit v1.2.3