diff options
author | Nelson Benítez León <nbenitezl@gmail.com> | 2023-05-16 12:56:59 +0100 |
---|---|---|
committer | Nelson Benítez León <nbenitezl@gmail.com> | 2023-05-16 13:20:14 +0100 |
commit | e87a221135b18cdc9ba1625cd6c0e146951c655f (patch) | |
tree | f3f0fb3fd11781c37cbf4d5bb4260c6e63bb7bbd | |
parent | df9ec82a51f1a1971ee6950a49e30884d7041dcc (diff) | |
download | gnome-control-center-fix_search_with_no_result.tar.gz |
fix visibility check for rows and avoid empty searchesfix_search_with_no_result
When pressing ENTER (i.e. activating) a search with no
results ("No results found") the first Wifi panel was
being activating, that's wrong because cc_panel_list_activate()
should activate the first visible panel, but there are
no visible panels at the moment (No results found page is shown)
The problem was the visibility check in cc_panel_list_activate()
was incomplete and so it wrongly thought panels were app visible.
Part of #2119 (comments 4th and 5th)
-rw-r--r-- | shell/cc-panel-list.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c index 7d37b59b6..d424c2ba5 100644 --- a/shell/cc-panel-list.c +++ b/shell/cc-panel-list.c @@ -851,7 +851,8 @@ cc_panel_list_activate (CcPanelList *self) /* Select the first visible row */ do row = gtk_list_box_get_row_at_index (GTK_LIST_BOX (listbox), i++); - while (row && !gtk_widget_get_visible (GTK_WIDGET (row))); + while (row && !(gtk_widget_get_visible (GTK_WIDGET (row)) && + gtk_widget_get_child_visible (GTK_WIDGET (row)))); /* If the row is valid, activate it */ if (row) |