diff options
| author | zorz <zorz@opentux.org> | 2026-02-27 17:37:23 +0200 |
|---|---|---|
| committer | zorz <zorz@opentux.org> | 2026-02-27 17:37:23 +0200 |
| commit | de196c8550dfd3317043fcc71de1506ac076e14f (patch) | |
| tree | 1e59293fa24652b1f7c96a95d522afd0590589bc /x11-xwayland | |
| parent | 83404b410d422331951d406323962f314f9546ee (diff) | |
| download | xorg-de196c8550dfd3317043fcc71de1506ac076e14f.tar.gz xorg-de196c8550dfd3317043fcc71de1506ac076e14f.tar.xz | |
Initial commit: xorg/x11 ports
Diffstat (limited to 'x11-xwayland')
| -rw-r--r-- | x11-xwayland/2113.patch | 52 | ||||
| -rw-r--r-- | x11-xwayland/MAKEPKG | 34 |
2 files changed, 86 insertions, 0 deletions
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 @@ | |||
| 1 | From 7fb5e00ad86ca862024ad7be83c670aacf805d09 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Liu Heng <liuhenga@uniontech.com> | ||
| 3 | Date: Fri, 12 Dec 2025 19:34:16 +0800 | ||
| 4 | Subject: [PATCH] xwayland: Fix incorrect pointer coordinates in enter events | ||
| 5 | |||
| 6 | Xwayland was sending incorrect pointer coordinates to X clients on | ||
| 7 | pointer enter events. | ||
| 8 | |||
| 9 | This was caused by calling CheckMotion() with a NULL event, which | ||
| 10 | prevented the pointer sprite hot coordinates from being updated | ||
| 11 | properly. | ||
| 12 | |||
| 13 | Fix this by constructing a proper DeviceEvent of type ET_Enter in | ||
| 14 | pointer_handle_enter, initializing it with the current timestamp | ||
| 15 | and EVENT_SOURCE_FOCUS, and passing it to CheckMotion() instead | ||
| 16 | of NULL. | ||
| 17 | |||
| 18 | This ensures the pointer sprite coordinates are correctly updated | ||
| 19 | when the pointer enters a window. | ||
| 20 | |||
| 21 | Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2113> | ||
| 22 | --- | ||
| 23 | hw/xwayland/xwayland-input.c | 5 ++++- | ||
| 24 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 25 | |||
| 26 | diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c | ||
| 27 | index cd2046e1d4..447627dc63 100644 | ||
| 28 | --- a/hw/xwayland/xwayland-input.c | ||
| 29 | +++ b/hw/xwayland/xwayland-input.c | ||
| 30 | @@ -528,6 +528,7 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, | ||
| 31 | int dx, dy; | ||
| 32 | ScreenPtr pScreen = xwl_screen->screen; | ||
| 33 | ValuatorMask mask; | ||
| 34 | + DeviceEvent enter; | ||
| 35 | |||
| 36 | /* There's a race here where if we create and then immediately | ||
| 37 | * destroy a surface, we might end up in a state where the Wayland | ||
| 38 | @@ -558,8 +559,10 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, | ||
| 39 | (*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE); | ||
| 40 | |||
| 41 | miPointerInvalidateSprite(master); | ||
| 42 | + init_device_event(&enter, dev, currentTime.milliseconds, EVENT_SOURCE_FOCUS); | ||
| 43 | + enter.type = ET_Enter; | ||
| 44 | |||
| 45 | - CheckMotion(NULL, master); | ||
| 46 | + CheckMotion(&enter, master); | ||
| 47 | |||
| 48 | /* Ideally, X clients shouldn't see these button releases. When | ||
| 49 | * the pointer leaves a window with buttons down, it means that | ||
| 50 | -- | ||
| 51 | GitLab | ||
| 52 | |||
diff --git a/x11-xwayland/MAKEPKG b/x11-xwayland/MAKEPKG new file mode 100644 index 0000000..a011764 --- /dev/null +++ b/x11-xwayland/MAKEPKG | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #!/bin/mkpkg | ||
| 2 | # *** OpenTUX *** | ||
| 3 | # description: X server for Wayland compatibility | ||
| 4 | # url: https://wayland.freedesktop.org/ | ||
| 5 | |||
| 6 | name=x11-xwayland | ||
| 7 | version=24.1.9 | ||
| 8 | release=1 | ||
| 9 | depends=(wayland nettle libxfont2 libxres libxshmfence | ||
| 10 | libxtst libpixman xkbcomp) | ||
| 11 | makedeps=(meson) | ||
| 12 | source=(https://xorg.freedesktop.org/releases/individual/xserver/xwayland-$version.tar.xz | ||
| 13 | 2113.patch) | ||
| 14 | |||
| 15 | patch() { | ||
| 16 | cd xwayland-$version | ||
| 17 | patch -p1 -i $SRC/2113.patch | ||
| 18 | } | ||
| 19 | |||
| 20 | build() { | ||
| 21 | meson setup xwayland-$version build \ | ||
| 22 | --prefix=/usr \ | ||
| 23 | --buildtype=plain \ | ||
| 24 | -D xkb_dir=/usr/share/X11/xkb \ | ||
| 25 | -D xkb_output_dir=/var/lib/xkb | ||
| 26 | |||
| 27 | meson compile -C build | ||
| 28 | DESTDIR=$PKG meson install -C build | ||
| 29 | |||
| 30 | rm -f $PKG/usr/lib/xorg/protocol.txt | ||
| 31 | rm -f $PKG/usr/share/man/man1/Xserver.1 | ||
| 32 | } | ||
| 33 | |||
| 34 | # vim: filetype=sh | ||