temp/gtk+3.0: Fix Phosh boot splash (MR 4332)

For the splash screen to correctly dismiss itself without
hitting the timeout, we need a Gtk patch.

This is described in the Phosh release notes:
https://gitlab.gnome.org/World/Phosh/phosh/-/releases/v0.30.0#required-patches-that-arent-merged-upstream-yet

The patch isn't in upstream yet, but there is an open PR:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5628

Mobian also carries the patch:
https://salsa.debian.org/Mobian-team/packages/gtk3/-/blob/mobian/debian/patches/purism/gdk-wayland-Track-last-touch-serial-on-seat.patch

So let's add the patch to pmOS as well. This fixes the Phosh splash
screens so they now disapear when the application is ready.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
[ci:skip-build]: already built successfully in CI
This commit is contained in:
Alistair Francis 2023-08-15 21:49:23 -04:00 committed by Oliver Smith
parent 40aa8e911f
commit b567653505
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 49 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# Forked from Alpine to apply Purism's patches for mobile usage # Forked from Alpine to apply Purism's patches for mobile usage
pkgname=gtk+3.0 pkgname=gtk+3.0
pkgver=9999_git20230719 pkgver=9999_git20230719
pkgrel=0 pkgrel=1
# pureos/latest branch # pureos/latest branch
_commit="084b40f29656945e4c12428a8e9a4d5310c0e56d" _commit="084b40f29656945e4c12428a8e9a4d5310c0e56d"
pkgdesc="The GTK+ Toolkit (v3)" pkgdesc="The GTK+ Toolkit (v3)"
@ -59,6 +59,7 @@ checkdepends="
gdk-pixbuf gdk-pixbuf
" "
source="https://source.puri.sm/Librem5/gtk/-/archive/$_commit/gtk-$_commit.tar.gz 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" builddir="$srcdir/gtk-$_commit"
@ -134,4 +135,5 @@ doc() {
sha512sums=" sha512sums="
8b9d14b4038a5e58b772bd2996adc6501fd025e5cf7973ef9fb8df2e1fea0bf7f9d4d71e3daa93418faf7759e35a390fe5d2a78a0a4c5829891955a615f41ea2 gtk-084b40f29656945e4c12428a8e9a4d5310c0e56d.tar.gz 8b9d14b4038a5e58b772bd2996adc6501fd025e5cf7973ef9fb8df2e1fea0bf7f9d4d71e3daa93418faf7759e35a390fe5d2a78a0a4c5829891955a615f41ea2 gtk-084b40f29656945e4c12428a8e9a4d5310c0e56d.tar.gz
4b8ecb3f1adb833fe4006d690c31d0d930687abc28f6033e6304c235227b6e86f6abaa2c7d015677d3fdecc628fa7d7d3927b48cfceec9ad144827274a176762 gdk-wayland-Track-last-touch-serial-on-seat.patch
" "

View file

@ -0,0 +1,46 @@
From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
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;
}