Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From 8fb3557bce1fdf9e2c4146e89b43753688d64455 Mon Sep 17 00:00:00 2001
From: Alessandro Astone <alessandro.astone@canonical.com>
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: <https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9716>
---
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

4 changes: 2 additions & 2 deletions srcpkgs/gtk+3/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'gtk+3'
pkgname=gtk+3
version=3.24.50
version=3.24.52
revision=1
build_style=meson
build_helper="gir"
Expand Down Expand Up @@ -33,7 +33,7 @@ license="LGPL-2.1-or-later"
homepage="https://www.gtk.org/"
changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/gtk-3-24/NEWS"
distfiles="${GNOME_SITE}/gtk/${version%.*}/gtk-${version}.tar.xz"
checksum=399118a5699314622165a11b769ea9b6ed68e037b6d46d57cfcf4851dec07529
checksum=80931fa472a77b9a164f6740e3c0b444fac6770054632d35a7ff9d679e5e7b9f
make_check_pre="xvfb-run dbus-run-session"
# _broken_tests=""

Expand Down