diff --git a/temp/gtk+3.0/APKBUILD b/temp/gtk+3.0/APKBUILD index 8e6375c2d..9a0cc024a 100644 --- a/temp/gtk+3.0/APKBUILD +++ b/temp/gtk+3.0/APKBUILD @@ -1,7 +1,7 @@ # Forked from Alpine to apply Purism's patches for mobile usage pkgname=gtk+3.0 pkgver=9999_git20230719 -pkgrel=0 +pkgrel=1 # pureos/latest branch _commit="084b40f29656945e4c12428a8e9a4d5310c0e56d" pkgdesc="The GTK+ Toolkit (v3)" @@ -59,6 +59,7 @@ checkdepends=" gdk-pixbuf " source="https://source.puri.sm/Librem5/gtk/-/archive/$_commit/gtk-$_commit.tar.gz + gdk-wayland-Track-last-touch-serial-on-seat.patch " builddir="$srcdir/gtk-$_commit" @@ -134,4 +135,5 @@ doc() { sha512sums=" 8b9d14b4038a5e58b772bd2996adc6501fd025e5cf7973ef9fb8df2e1fea0bf7f9d4d71e3daa93418faf7759e35a390fe5d2a78a0a4c5829891955a615f41ea2 gtk-084b40f29656945e4c12428a8e9a4d5310c0e56d.tar.gz +4b8ecb3f1adb833fe4006d690c31d0d930687abc28f6033e6304c235227b6e86f6abaa2c7d015677d3fdecc628fa7d7d3927b48cfceec9ad144827274a176762 gdk-wayland-Track-last-touch-serial-on-seat.patch " diff --git a/temp/gtk+3.0/gdk-wayland-Track-last-touch-serial-on-seat.patch b/temp/gtk+3.0/gdk-wayland-Track-last-touch-serial-on-seat.patch new file mode 100644 index 000000000..dbee08df2 --- /dev/null +++ b/temp/gtk+3.0/gdk-wayland-Track-last-touch-serial-on-seat.patch @@ -0,0 +1,46 @@ +From: =?utf-8?q?Guido_G=C3=BCnther?= +Date: Fri, 10 Mar 2023 12:25:13 +0100 +Subject: gdk/wayland: Track last touch serial on seat + +Since the touch data is released on touch up +_gdk_wayland_seat_get_last_implicit_grab_serial will return 0 serial +most of the time for touch only devices. This breaks xdg activation as +the compositor will reject tokens that have a 0 serial set via +xdg_activation_token_v1_set_serial. + +Avoid that by tracking touch serials on the seat itself too. +--- + gdk/wayland/gdkdevice-wayland.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c +index 9dc86a3..9570e82 100644 +--- a/gdk/wayland/gdkdevice-wayland.c ++++ b/gdk/wayland/gdkdevice-wayland.c +@@ -212,6 +212,7 @@ struct _GdkWaylandSeat + GdkKeymap *keymap; + + GHashTable *touches; ++ guint32 last_touch_down_serial; + GList *tablets; + GList *tablet_tools; + GList *tablet_pads; +@@ -2514,7 +2515,7 @@ touch_handle_down (void *data, + touch = gdk_wayland_seat_add_touch (seat, id, wl_surface); + touch->x = wl_fixed_to_double (x); + touch->y = wl_fixed_to_double (y); +- touch->touch_down_serial = serial; ++ seat->last_touch_down_serial = touch->touch_down_serial = serial; + + event = _create_touch_event (seat, touch, GDK_TOUCH_BEGIN, time); + +@@ -5398,6 +5399,9 @@ _gdk_wayland_seat_get_last_implicit_grab_serial (GdkSeat *seat, + } + } + ++ if (wayland_seat->last_touch_down_serial > serial) ++ serial = wayland_seat->last_touch_down_serial; ++ + return serial; + } +