diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-05-29 19:20:44 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-05-29 19:20:44 -0300 |
commit | f4b630030ca5a3543915fc92808294adfa13a2a6 (patch) | |
tree | bbdd21b745cf0d90f36934979a7449febf5cd896 /shell/cc-panel-list.c | |
parent | 72a3516389a0809956a324097610ed88c528db29 (diff) | |
download | gnome-control-center-f4b630030ca5a3543915fc92808294adfa13a2a6.tar.gz |
panel-list: Properly select panels when changing views
When moving from and to different views, the first row
might be activated due to focus going to the listbox. This
wasn't a problem before because we couldn't hit that code
path, but now we can.
Fix that by always selecting the first visible row.
Diffstat (limited to 'shell/cc-panel-list.c')
-rw-r--r-- | shell/cc-panel-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c index 408a0de77..2c0c70845 100644 --- a/shell/cc-panel-list.c +++ b/shell/cc-panel-list.c @@ -835,7 +835,7 @@ cc_panel_list_activate (CcPanelList *self) while (row && !gtk_widget_get_visible (GTK_WIDGET (row))); /* If the row is valid, activate it */ - if (row && !gtk_list_box_row_is_selected (row)) + if (row) { gtk_list_box_select_row (GTK_LIST_BOX (listbox), row); gtk_widget_grab_focus (GTK_WIDGET (row)); |