Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package otpclient for openSUSE:Factory 
checked in at 2026-11-23 14:54:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/otpclient (Old)
 and      /work/SRC/openSUSE:Factory/.otpclient.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "otpclient"

Mon Nov 23 14:54:25 2026 rev:61 rq:1399912 version:5.3.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/otpclient/otpclient.changes      2026-11-03 
18:04:01.184633283 +0100
+++ /work/SRC/openSUSE:Factory/.otpclient.new.1340718/otpclient.changes 
2026-11-23 14:54:45.400849747 +0100
@@ -1,0 +2,19 @@
+Fri Nov 20 07:53:51 UTC 2026 - Dominique Leuenberger <[email protected]>
+
+- Update to version 5.3.3:
+  * Bug fix release. Keyboard focus lands on the token list again after
+    unlocking, so Up, Down and Enter work right away, and searching no longer
+    moves focus out of the search bar. There is no on-disk format change;
+    existing databases open unchanged.:
+    + FIX: after unlocking a database, or switching to another one from the
+      sidebar, keyboard focus stayed on the toolbar instead of the token list,
+      a regression from 5.3.0
+    + FIX: a search that matched nothing moved focus from the search bar to the
+      Clear Filters button, so Backspace did nothing and Space cleared the
+      search
+    + FIX: while the token list was being filled, the first token made the
+      window pick the "no results" page instead of the list
+    + TEST: the unlock sequence and a search that stops matching are replayed
+      against the real window
+
+-------------------------------------------------------------------

Old:
----
  OTPClient-5.3.2.tar.xz

New:
----
  OTPClient-5.3.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ otpclient.spec ++++++
--- /var/tmp/diff_new_pack.DXnqHp/_old  2026-11-23 14:54:46.536897980 +0100
+++ /var/tmp/diff_new_pack.DXnqHp/_new  2026-11-23 14:54:46.538898065 +0100
@@ -18,7 +18,7 @@
 
 %define uclname OTPClient
 Name:           otpclient
-Version:        5.3.2
+Version:        5.3.3
 Release:        0
 Summary:        Simple GTK+ client for managing TOTP and HOTP
 License:        GPL-3.0-or-later

++++++ OTPClient-5.3.2.tar.xz -> OTPClient-5.3.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.3.2/CMakeLists.txt 
new/OTPClient-5.3.3/CMakeLists.txt
--- old/OTPClient-5.3.2/CMakeLists.txt  2026-11-03 08:34:16.000000000 +0100
+++ new/OTPClient-5.3.3/CMakeLists.txt  2026-11-19 15:26:37.000000000 +0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.25)
-project(OTPClient VERSION "5.3.2" LANGUAGES "C")
+project(OTPClient VERSION "5.3.3" LANGUAGES "C")
 include(GNUInstallDirs)
 include(CTest)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OTPClient-5.3.2/data/com.github.paolostivanin.OTPClient.appdata.xml 
new/OTPClient-5.3.3/data/com.github.paolostivanin.OTPClient.appdata.xml
--- old/OTPClient-5.3.2/data/com.github.paolostivanin.OTPClient.appdata.xml     
2026-11-03 08:34:16.000000000 +0100
+++ new/OTPClient-5.3.3/data/com.github.paolostivanin.OTPClient.appdata.xml     
2026-11-19 15:26:37.000000000 +0100
@@ -95,6 +95,17 @@
   </content_rating>
 
   <releases>
+    <release version="5.3.3" date="2026-11-19">
+      <description>
+        <p>Bug fix release. Keyboard focus lands on the token list again after 
unlocking, so Up, Down and Enter work right away, and searching no longer moves 
focus out of the search bar. There is no on-disk format change; existing 
databases open unchanged.</p>
+        <ul>
+          <li>FIX: after unlocking a database, or switching to another one 
from the sidebar, keyboard focus stayed on the toolbar instead of the token 
list, a regression from 5.3.0 (#445)</li>
+          <li>FIX: a search that matched nothing moved focus from the search 
bar to the Clear Filters button, so Backspace did nothing and Space cleared the 
search</li>
+          <li>FIX: while the token list was being filled, the first token made 
the window pick the "no results" page instead of the list</li>
+          <li>TEST: the unlock sequence and a search that stops matching are 
replayed against the real window</li>
+        </ul>
+      </description>
+    </release>
     <release version="5.3.2" date="2026-11-03">
       <description>
         <p>Bug fix release. OTPClient no longer aborts at startup when GLib 
finds a settings schema left over from an older release, and staged package 
installs no longer generate system caches. There is no on-disk format change; 
existing databases open unchanged.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.3.2/src/gui/otpclient-window-private.h 
new/OTPClient-5.3.3/src/gui/otpclient-window-private.h
--- old/OTPClient-5.3.2/src/gui/otpclient-window-private.h      2026-11-03 
08:34:16.000000000 +0100
+++ new/OTPClient-5.3.3/src/gui/otpclient-window-private.h      2026-11-19 
15:26:37.000000000 +0100
@@ -86,6 +86,10 @@
     gchar *active_group_filter;  /* NULL = "All", "" = "Ungrouped", non-empty 
= group name */
     gboolean syncing_group_filter;
 
+    /* The content stack changed page and its primary widget has not taken
+     * focus yet, see focus_visible_page(). */
+    gboolean page_focus_pending;
+
     /* Search filter cache: lowered forms of the search box contents, refreshed
      * whenever the filter is invalidated (search text changed / group changed 
/
      * cross-db load completed). search_filter_func runs once per visible row,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.3.2/src/gui/otpclient-window.c 
new/OTPClient-5.3.3/src/gui/otpclient-window.c
--- old/OTPClient-5.3.2/src/gui/otpclient-window.c      2026-11-03 
08:34:16.000000000 +0100
+++ new/OTPClient-5.3.3/src/gui/otpclient-window.c      2026-11-19 
15:26:37.000000000 +0100
@@ -1501,6 +1501,60 @@
     gtk_widget_action_set_enabled (GTK_WIDGET (self), "win.review-quarantine", 
reveal);
 }
 
+/* The widget that should hold keyboard focus when a content page first becomes
+ * visible, so the obvious next action (consume a token, add the first token,
+ * create the first DB) is one keystroke away rather than buried past the
+ * toolbar (issue #445). "loading" is transient, so it has none and focus is
+ * left alone instead of flickering. */
+static GtkWidget *
+page_primary_widget (OTPClientWindow *self,
+                     const gchar     *page)
+{
+    if (g_strcmp0 (page, "list") == 0)
+        return self->otp_list;
+    if (g_strcmp0 (page, "empty") == 0)
+        return self->empty_state_add_button;
+    if (g_strcmp0 (page, "no-search-results") == 0)
+        return self->search_empty_clear_button;
+    if (g_strcmp0 (page, "no-db") == 0)
+        return self->no_db_create_button;
+    if (g_strcmp0 (page, "locked") == 0)
+        return self->locked_unlock_button;
+    return NULL;
+}
+
+/* Land focus on the visible page's primary widget, once per page change.
+ *
+ * The request stays pending until the grab succeeds, because a page can show
+ * up before its widget is usable: populate appends the first token, which
+ * flips the stack to "list", but the list stays insensitive until populate
+ * re-enables it at the very end, and GTK refuses to focus an insensitive
+ * widget. Granting focus right then and never retrying is how #445 came back
+ * in 5.3.0. otpclient_window_set_db_actions_enabled() retries.
+ *
+ * A page change caused by typing in the search bar (a query that stops
+ * matching, or matches again) never moves focus out of it: the user is
+ * still typing. */
+static void
+focus_visible_page (OTPClientWindow *self)
+{
+    if (!self->page_focus_pending || self->content_stack == NULL)
+        return;
+
+    GtkWidget *focus = gtk_root_get_focus (GTK_ROOT (self));
+    if (focus != NULL && self->search_bar != NULL &&
+        gtk_widget_is_ancestor (focus, self->search_bar))
+    {
+        self->page_focus_pending = FALSE;
+        return;
+    }
+
+    GtkWidget *target = page_primary_widget (
+        self, gtk_stack_get_visible_child_name (GTK_STACK 
(self->content_stack)));
+    if (target == NULL || gtk_widget_grab_focus (target))
+        self->page_focus_pending = FALSE;
+}
+
 static void
 update_empty_state (OTPClientWindow *self)
 {
@@ -1538,28 +1592,9 @@
     const gchar *current_page = gtk_stack_get_visible_child_name (GTK_STACK 
(self->content_stack));
     gtk_stack_set_visible_child_name (GTK_STACK (self->content_stack), 
target_page);
 
-    /* Move focus onto the page's primary widget when it first becomes
-     * visible, so the obvious next action (consume a token, add the first
-     * token, create the first DB) is one keystroke away rather than buried
-     * past the toolbar (issue #445). "loading" is transient - leave focus
-     * alone so it doesn't flicker. */
     if (g_strcmp0 (target_page, current_page) != 0)
-    {
-        GtkWidget *focus_target = NULL;
-        if (g_strcmp0 (target_page, "list") == 0)
-            focus_target = self->otp_list;
-        else if (g_strcmp0 (target_page, "empty") == 0)
-            focus_target = self->empty_state_add_button;
-        else if (g_strcmp0 (target_page, "no-search-results") == 0)
-            focus_target = self->search_empty_clear_button;
-        else if (g_strcmp0 (target_page, "no-db") == 0)
-            focus_target = self->no_db_create_button;
-        else if (g_strcmp0 (target_page, "locked") == 0)
-            focus_target = self->locked_unlock_button;
-
-        if (focus_target != NULL)
-            gtk_widget_grab_focus (focus_target);
-    }
+        self->page_focus_pending = TRUE;
+    focus_visible_page (self);
 
     if (g_strcmp0 (target_page, "list") != 0 && g_strcmp0 (target_page, 
"empty") != 0)
         return;
@@ -1660,6 +1695,9 @@
     for (gsize i = 0; i < G_N_ELEMENTS (db_actions); i++)
         gtk_widget_action_set_enabled (GTK_WIDGET (self), db_actions[i], 
enabled);
     gtk_widget_set_sensitive (self->otp_list, enabled);
+    /* A page shown while its widget was still disabled gets focus now. */
+    if (enabled)
+        focus_visible_page (self);
     update_bulk_selection_count (self);
     update_quarantine_banner (self);
 }
@@ -1703,8 +1741,12 @@
 setup_otp_view (OTPClientWindow *self)
 {
     self->otp_store = G_LIST_STORE (g_object_ref_sink (g_list_store_new 
(OTP_TYPE_ENTRY)));
-    g_signal_connect (self->otp_store, "items-changed",
-                      G_CALLBACK (on_otp_store_items_changed), self);
+    /* After, not before: the filter model below listens to the same signal,
+     * and update_empty_state reads its count. Connected first and run first,
+     * it saw the row just appended in the store but not yet in the filter, so
+     * the first token of a database picked "no-search-results". */
+    g_signal_connect_after (self->otp_store, "items-changed",
+                            G_CALLBACK (on_otp_store_items_changed), self);
 
     self->search_filter = gtk_custom_filter_new (search_filter_func, self, 
NULL);
     self->filter_model = gtk_filter_list_model_new (G_LIST_MODEL 
(self->otp_store),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.3.2/tests/README.md 
new/OTPClient-5.3.3/tests/README.md
--- old/OTPClient-5.3.2/tests/README.md 2026-11-03 08:34:16.000000000 +0100
+++ new/OTPClient-5.3.3/tests/README.md 2026-11-19 15:26:37.000000000 +0100
@@ -111,8 +111,10 @@
 `test_gui_flows` exercises the real GTK application: selecting a row consumes 
no
 HOTP, explicit generation persists before copying, switching to the CLI 
produces
 the next code, external clipboard changes cancel OTPClient's ownership, locking
-clears sensitive dialogs even when references remain, and cross-database HOTP
-activation opens the owning database.
+clears sensitive dialogs even when references remain, cross-database HOTP
+activation opens the owning database, a page change lands keyboard focus on the
+page's primary widget even when the token list is enabled only after it appears
+(#445), and searching never moves focus out of the search bar.
 
 `test_tray_session` covers desktop locking and tray recovery (#473) using fake
 screensaver and StatusNotifierWatcher services. CTest runs each scenario in its
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.3.2/tests/test_gui_flows.c 
new/OTPClient-5.3.3/tests/test_gui_flows.c
--- old/OTPClient-5.3.2/tests/test_gui_flows.c  2026-11-03 08:34:16.000000000 
+0100
+++ new/OTPClient-5.3.3/tests/test_gui_flows.c  2026-11-19 15:26:37.000000000 
+0100
@@ -1349,6 +1349,98 @@
     review_fixture_clear (&fixture);
 }
 
+static gboolean
+focus_is_within (GtkWidget *widget)
+{
+    GtkWidget *focus = gtk_root_get_focus (GTK_ROOT (win));
+    return focus != NULL && (focus == widget || gtk_widget_is_ancestor (focus, 
widget));
+}
+
+static void
+test_unlock_focuses_token_list (void)
+{
+    ReviewFixture fixture;
+    review_fixture_init (&fixture);
+    otpclient_application_set_db_data (app, database_data_ref (fixture.db));
+    otpclient_application_set_app_locked (app, FALSE);
+    otpclient_window_set_db_actions_enabled (win, TRUE);
+    g_list_store_remove_all (win->otp_store);
+    gtk_window_present (GTK_WINDOW (win));
+    settle ();
+
+    /* What on_unlock_done does (#445): the list is disabled while the worker
+     * runs behind the loading page, then populate appends the rows, the first
+     * of which flips the page to "list", and only afterwards re-enables the
+     * list. Focus starts on the toolbar, where the window leaves it. */
+    otpclient_window_set_db_actions_enabled (win, FALSE);
+    otpclient_window_show_loading (win);
+    g_assert_true (gtk_widget_grab_focus (win->settings_button));
+    settle ();
+    const gchar *accounts[] = { "alice", "bob" };
+    for (gsize i = 0; i < G_N_ELEMENTS (accounts); i++) {
+        OTPEntry *entry = otp_entry_new (accounts[i], "Example", NULL, "TOTP", 
30, 0,
+                                        "SHA1", 6, REVIEW_SECRET);
+        otp_entry_update_otp (entry);
+        g_list_store_append (win->otp_store, entry);
+        g_object_unref (entry);
+        g_assert_cmpstr (gtk_stack_get_visible_child_name (
+            GTK_STACK (win->content_stack)), ==, "list");
+    }
+    /* Re-enabling is the last step of the database-open paths that do not
+     * pass through hide_loading, so focus must land right here. */
+    otpclient_window_set_db_actions_enabled (win, TRUE);
+    g_assert_true (focus_is_within (win->otp_list));
+    otpclient_window_hide_loading (win);
+    settle ();
+    g_assert_true (focus_is_within (win->otp_list));
+
+    /* Steady state: an encryption job disabling and re-enabling the list
+     * changes no page, so it must not pull focus back to the list. */
+    gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (win->search_bar), TRUE);
+    settle ();
+    g_assert_true (gtk_widget_grab_focus (win->search_entry));
+    otpclient_window_set_db_actions_enabled (win, FALSE);
+    otpclient_window_set_db_actions_enabled (win, TRUE);
+    settle ();
+    g_assert_true (focus_is_within (win->search_bar));
+
+    gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (win->search_bar), FALSE);
+    settle ();
+    review_fixture_clear (&fixture);
+}
+
+static void
+test_search_keeps_focus (void)
+{
+    ReviewFixture fixture;
+    g_autoptr (OTPEntry) entry = attach_fixture (&fixture);
+    gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (win->search_bar), TRUE);
+    settle ();
+    g_assert_true (gtk_widget_grab_focus (win->search_entry));
+
+    /* A query that stops matching swaps in the no-results page, but the user
+     * is still typing: focus must not jump to its Clear button. */
+    gtk_editable_set_text (GTK_EDITABLE (win->search_entry), "zzz");
+    g_signal_emit_by_name (win->search_entry, "search-changed");
+    settle ();
+    g_assert_cmpstr (gtk_stack_get_visible_child_name (
+        GTK_STACK (win->content_stack)), ==, "no-search-results");
+    g_assert_true (focus_is_within (win->search_bar));
+
+    /* Fixing the query brings the list back, still without taking focus. */
+    gtk_editable_set_text (GTK_EDITABLE (win->search_entry), "ali");
+    g_signal_emit_by_name (win->search_entry, "search-changed");
+    settle ();
+    g_assert_cmpstr (gtk_stack_get_visible_child_name (
+        GTK_STACK (win->content_stack)), ==, "list");
+    g_assert_true (focus_is_within (win->search_bar));
+
+    gtk_widget_activate_action (GTK_WIDGET (win), "win.clear-search", NULL);
+    gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (win->search_bar), FALSE);
+    settle ();
+    review_fixture_clear (&fixture);
+}
+
 static GtkDropTarget *
 find_drop_target (GtkWidget *widget)
 {
@@ -1906,6 +1998,8 @@
     g_test_add_func ("/gui-flows/group-search-bounds", 
test_group_search_bounds);
     g_test_add_func ("/gui-flows/group-search-all-matches", 
test_group_search_preserves_all_matches);
     g_test_add_func ("/gui-flows/clear-group-filter", 
test_clear_filters_resets_group_only_filter);
+    g_test_add_func ("/gui-flows/unlock-focuses-token-list", 
test_unlock_focuses_token_list);
+    g_test_add_func ("/gui-flows/search-keeps-focus", test_search_keeps_focus);
     g_test_add_func ("/gui-flows/edit-counter-bound", 
test_edit_dialog_counter_bound_is_exclusive);
     g_test_add_func ("/gui-flows/failed-reorder-restores-row-order", 
test_failed_reorder_restores_row_order);
     g_test_add_func ("/gui-flows/autostart-adoption", test_autostart_adoption);

++++++ OTPClient.obsinfo ++++++
--- /var/tmp/diff_new_pack.DXnqHp/_old  2026-11-23 14:54:46.722905878 +0100
+++ /var/tmp/diff_new_pack.DXnqHp/_new  2026-11-23 14:54:46.725906005 +0100
@@ -1,5 +1,5 @@
 name: OTPClient
-version: 5.3.2
-mtime: 1793691256
-commit: ee8fbf049bc5192154f7a676d4c5c8947089a8ac
+version: 5.3.3
+mtime: 1795098397
+commit: f296a42739cf8066dbe0abe6b1bc85e455350de5
 

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.DXnqHp/_old  2026-11-23 14:54:46.745906854 +0100
+++ /var/tmp/diff_new_pack.DXnqHp/_new  2026-11-23 14:54:46.748906982 +0100
@@ -1,7 +1,7 @@
-mtime: 1793694027
-commit: 61b058ebcbf9003e2f2ef3b13aff9392aacfa4a03fc0dbf8e0da0cb2afb83e9a
+mtime: 1795161283
+commit: c04a4759a56caf7085ec7602340e7aa568722088b439c764b2a86dbf0e09f5a5
 url: https://src.opensuse.org/GNOME/otpclient
-revision: 61b058ebcbf9003e2f2ef3b13aff9392aacfa4a03fc0dbf8e0da0cb2afb83e9a
+revision: c04a4759a56caf7085ec7602340e7aa568722088b439c764b2a86dbf0e09f5a5
 trackingbranch: factory
 projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.DXnqHp/_old  2026-11-23 14:54:46.763907619 +0100
+++ /var/tmp/diff_new_pack.DXnqHp/_new  2026-11-23 14:54:46.767907788 +0100
@@ -3,7 +3,7 @@
   <service name="obs_scm" mode="manual">
     <param name="scm">git</param>
     <param name="url">https://github.com/paolostivanin/OTPClient.git</param>
-    <param name="revision">v5.3.2</param>
+    <param name="revision">v5.3.3</param>
     <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
     <param name="versionrewrite-pattern">v?(.*)\+0</param>
     <param name="versionrewrite-replacement">\1</param>

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-11-20 08:54:43.000000000 +0100
@@ -0,0 +1,5 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild
+osc-collab.*

Reply via email to