diff --git a/0001-Filechooser-Fix-a-focus-mishap.patch b/0001-Filechooser-Fix-a-focus-mishap.patch new file mode 100644 index 0000000000000000000000000000000000000000..154e8904423a7af848ae00d791e99a4e9e11455f --- /dev/null +++ b/0001-Filechooser-Fix-a-focus-mishap.patch @@ -0,0 +1,52 @@ +From 9ef20fbf3e9f93e28d54e84731b90a1cd40bcc8e Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Mon, 25 Nov 2024 18:25:00 -0500 +Subject: [PATCH] Filechooser: Fix a focus mishap + +When the focus is on the server entry in the places view, we +don't want to steal key events to start a search. +--- + gtk/gtkfilechooserwidget.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c +index e10bebda21..791e82c578 100644 +--- a/gtk/gtkfilechooserwidget.c ++++ b/gtk/gtkfilechooserwidget.c +@@ -93,6 +93,7 @@ + #include "gtkmultisorter.h" + #include "gtkcolumnviewsorter.h" + #include "gtkexpression.h" ++#include "gtkactionbar.h" + + #ifndef G_OS_WIN32 + #include "gtkopenuriportal.h" +@@ -6833,6 +6834,8 @@ captured_key (GtkEventControllerKey *controller, + { + GtkFileChooserWidget *impl = data; + gboolean handled; ++ GtkWidget *focus; ++ GtkWidget *ancestor; + + if (impl->operation_mode == OPERATION_MODE_SEARCH || + impl->operation_mode == OPERATION_MODE_ENTER_LOCATION || +@@ -6843,10 +6846,14 @@ captured_key (GtkEventControllerKey *controller, + if (keyval == GDK_KEY_slash || keyval == GDK_KEY_asciitilde || keyval == GDK_KEY_period) + return GDK_EVENT_PROPAGATE; + ++ focus = gtk_root_get_focus (gtk_widget_get_root (GTK_WIDGET (impl))); ++ ++ ancestor = gtk_widget_get_ancestor (focus, GTK_TYPE_ACTION_BAR); ++ if (ancestor && gtk_widget_is_ancestor (ancestor, impl->places_view)) ++ return GDK_EVENT_PROPAGATE; ++ + if (impl->location_entry) + { +- GtkWidget *focus = gtk_root_get_focus (gtk_widget_get_root (GTK_WIDGET (impl))); +- + if (focus && gtk_widget_is_ancestor (focus, impl->location_entry)) + return GDK_EVENT_PROPAGATE; + } +-- +2.48.1 + diff --git a/gtk-4.15.3.tar.xz b/gtk-4.16.7.tar.xz similarity index 67% rename from gtk-4.15.3.tar.xz rename to gtk-4.16.7.tar.xz index 6e1b943481a06fdccd5147728ecdf4702ecd43cb..fc39d7021bca03e18730d94e6cc1a7d2f5af438b 100644 Binary files a/gtk-4.15.3.tar.xz and b/gtk-4.16.7.tar.xz differ diff --git a/gtk4.spec b/gtk4.spec index 0e108e639eac6370d816021bbceed1133c122936..8c1f1d95f22516dc27ea2077ef36c2c7312f7864 100644 --- a/gtk4.spec +++ b/gtk4.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 1 %global __provides_exclude_from ^%{_libdir}/gtk-4.0 @@ -12,14 +12,15 @@ %global wayland_version 1.21.0 Name: gtk4 -Version: 4.15.3 +Version: 4.16.7 Release: %{anolis_release}%{?dist} Summary: GTK graphical user interface library License: LGPL-2.0-or-later URL: https://www.gtk.org -Source0: https://download.gnome.org/sources/gtk/4.15/gtk-%{version}.tar.xz +Source0: https://download.gnome.org/sources/gtk/4.15/gtk-4.16.7.tar.xz Patch0: gtk4-no-objcopy.patch +Patch1: 0001-Filechooser-Fix-a-focus-mishap.patch Epoch: 1 @@ -262,6 +263,10 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop %{_mandir}/man1/gtk4-rendernode-tool.1* %changelog +* Thu Sep 18 2025 wenyuzifang - 4.16.7-1 +- Updated to version 4.16.7 to fix xxxxxx +- Fix focus handling to prevent accidental search activation when typing in the server entry + * Fri Jul 11 2025 mgb01105731 - 1:4.15.3-1 - Downgrade version to 4.15.3 to fix nautilus bug