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.
This commit is contained in:
parent
72a3516389
commit
f4b630030c
1 changed files with 1 additions and 1 deletions
|
@ -835,7 +835,7 @@ cc_panel_list_activate (CcPanelList *self)
|
||||||
while (row && !gtk_widget_get_visible (GTK_WIDGET (row)));
|
while (row && !gtk_widget_get_visible (GTK_WIDGET (row)));
|
||||||
|
|
||||||
/* If the row is valid, activate it */
|
/* 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_list_box_select_row (GTK_LIST_BOX (listbox), row);
|
||||||
gtk_widget_grab_focus (GTK_WIDGET (row));
|
gtk_widget_grab_focus (GTK_WIDGET (row));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue