From bce6cffcb35b624151b691436a733bb094599559 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 24 Mar 2026 10:43:05 +0900 Subject: [PATCH] gnu: gtk+: Update to 3.24.52. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/gtk3-treeview-test-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gtk.scm (gtk+): Update to 3.24.52. Apply patch. Change-Id: Ibf49241f637ac1d5ed2c6f9675f78810c8acb265 Signed-off-by: Noé Lopez --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 43 ++++++------ .../patches/gtk3-treeview-test-fix.patch | 67 +++++++++++++++++++ 3 files changed, 89 insertions(+), 22 deletions(-) create mode 100644 gnu/packages/patches/gtk3-treeview-test-fix.patch diff --git a/gnu/local.mk b/gnu/local.mk index d0392eae5eb..25b723118e6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1588,6 +1588,7 @@ dist_patch_DATA = \ %D%/packages/patches/gtk2-theme-paths.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ + %D%/packages/patches/gtk3-treeview-test-fix.patch \ %D%/packages/patches/gtk-doc-respect-xml-catalog.patch \ %D%/packages/patches/gtk-doc-mkhtml-test-fix.patch \ %D%/packages/patches/gtk4-demo-reproducible.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 6c439f33d74..76c6b50e371 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -24,7 +24,7 @@ ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2020 Brendan Tildesley ;;; Copyright © 2020 Guillaume Le Vaillant -;;; Copyright © 2020-2025 Maxim Cournoyer +;;; Copyright © 2020-2026 Maxim Cournoyer ;;; Copyright © 2021 Leo Famulari ;;; Copyright © 2021 Simon Streit ;;; Copyright © 2021 Maxime Devos @@ -987,7 +987,7 @@ application suites.") (package (inherit gtk+-2) (name "gtk+") - (version "3.24.51") + (version "3.24.52") (source (origin (method git-fetch) (uri (git-reference @@ -996,10 +996,11 @@ application suites.") (file-name (git-file-name name version)) (sha256 (base32 - "07vw0rani9d65px36fzzj7sprv5r48shyjdgzipkihzqaldd98yh")) + "197w1mb5vqm5d07sgdqkg54can7f1p4yjh42zx0y8z6m9p43shck")) (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch" - "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch")))) + "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch" + "gtk3-treeview-test-fix.patch")))) ;; There is no "doc" output, because adding gtk-doc here would introduce a ;; dependency cycle with itself. (outputs '("out" "bin")) @@ -1075,22 +1076,20 @@ application suites.") #~(modify-phases %standard-phases (add-after 'unpack 'disable-failing-tests (lambda _ - ;; These tests fail only in the containerized environment, for - ;; unknown reasons. - (substitute* "testsuite/gtk/meson.build" - ((".*\\['defaultvalue'],.*") "") - ((".*\\['objects-finalize',.*") "")) - ;; The 'flipping-icons.ui' and 'gtk-icontheme-sizing.ui' tests - ;; fail for unknown reasons (see: - ;; ). - (substitute* "testsuite/reftests/meson.build" - ((" 'flipping-icons.ui',.*") "") - ((" 'gtk-icontheme-sizing.ui',.*") "")) - ;; This test fails just on i686-linux, for unknown reasons. - #$@(if (target-x86-32?) - #~((substitute* "testsuite/reftests/meson.build" - ((" 'linear-gradient.ui',.*") ""))) - #~()))) + (substitute* "testsuite/gtk/meson.build" + ((".*\\['defaultvalue'],.*") "") + ((".*\\['objects-finalize',.*") "")) + ;; The 'flipping-icons.ui' and 'gtk-icontheme-sizing.ui' tests + ;; fail for unknown reasons (see: + ;; ). + (substitute* "testsuite/reftests/meson.build" + ((" 'flipping-icons.ui',.*") "") + ((" 'gtk-icontheme-sizing.ui',.*") "")) + ;; This test fails just on i686-linux, for unknown reasons. + #$@(if (target-x86-32?) + #~((substitute* "testsuite/reftests/meson.build" + ((" 'linear-gradient.ui',.*") ""))) + #~()))) (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file)) @@ -1114,8 +1113,8 @@ application suites.") "/share/applications"))))))) (native-search-paths (list (search-path-specification - (variable "GUIX_GTK3_PATH") - (files '("lib/gtk-3.0"))))))) + (variable "GUIX_GTK3_PATH") + (files '("lib/gtk-3.0"))))))) (define-public gtk (package diff --git a/gnu/packages/patches/gtk3-treeview-test-fix.patch b/gnu/packages/patches/gtk3-treeview-test-fix.patch new file mode 100644 index 00000000000..52505b188e3 --- /dev/null +++ b/gnu/packages/patches/gtk3-treeview-test-fix.patch @@ -0,0 +1,67 @@ +From 8fb3557bce1fdf9e2c4146e89b43753688d64455 Mon Sep 17 00:00:00 2001 +From: Alessandro Astone +Date: Mon, 23 Mar 2026 15:48:20 +0100 +Subject: [PATCH] testsuite/a11y: Fixup treeview test after focus policy + changes + +Since commit + fbc28541f0 ("a11y: Don't send focus-related events for unfocused treeview") +the window must have focus in order for the treeview to have focus and emit +the signal we want to test for. + +Part-of: +--- + testsuite/a11y/tree-relationships.c | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/testsuite/a11y/tree-relationships.c b/testsuite/a11y/tree-relationships.c +index 34f45b690a5..a1cc1f38288 100644 +--- a/testsuite/a11y/tree-relationships.c ++++ b/testsuite/a11y/tree-relationships.c +@@ -223,6 +223,24 @@ process_pending_idles () + g_main_loop_run (loop); + } + ++static void ++on_window_focus (GObject *obj, ++ GParamSpec *pspec, ++ gpointer data) ++{ ++ GMainLoop *loop = data; ++ g_main_loop_quit (loop); ++} ++ ++ ++static void ++wait_window_focus (GtkWidget *window) ++{ ++ GMainLoop *loop = g_main_loop_new (NULL, FALSE); ++ g_signal_connect (window, "notify::is-active", G_CALLBACK (on_window_focus), loop); ++ g_main_loop_run (loop); ++} ++ + static void + test_a11y_tree_focus (void) + { +@@ -243,13 +261,15 @@ test_a11y_tree_focus (void) + window = builder_get_toplevel (builder); + g_assert (window); + +- populate_tree (builder); ++ gtk_widget_show (window); ++ gtk_window_present (GTK_WINDOW (window)); ++ wait_window_focus (window); + ++ populate_tree (builder); + tv = (GtkTreeView *)gtk_builder_get_object (builder, "treeview1"); + gtk_tree_view_expand_all (tv); + +- gtk_widget_show (window); +- ++ gtk_widget_grab_focus (GTK_WIDGET (tv)); + gtk_tree_view_get_cursor (tv, &path, &focus_column); + gtk_tree_path_down (path); + data.count = 0; +-- +GitLab +