views/month-view-row: Only find first/last event widget if tabbing through another widget
This was overlooked from the original commit: https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/598/diffs?commit_id=4ad8aeac65648f8d0873f8392cd8ab9109de5198#c04c121e2c8eebcfb09fbcbeecff310223fe987f_471_600 Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/706>
This commit is contained in:
@@ -773,25 +773,28 @@ gcal_month_view_row_focus (GtkWidget *widget,
|
||||
root = gtk_widget_get_root (widget);
|
||||
focused = gtk_root_get_focus (root);
|
||||
|
||||
if (!focused || gtk_widget_is_ancestor (focused, widget))
|
||||
if (!focused)
|
||||
return GTK_WIDGET_CLASS (gcal_month_view_row_parent_class)->focus (widget, direction);
|
||||
|
||||
switch (direction)
|
||||
if (!gtk_widget_is_ancestor (focused, widget))
|
||||
{
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
if ((new_focus = find_first_event_widget (self)))
|
||||
return gtk_widget_grab_focus (new_focus);
|
||||
else
|
||||
return FALSE;
|
||||
switch (direction)
|
||||
{
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
if ((new_focus = find_first_event_widget (self)))
|
||||
return gtk_widget_grab_focus (new_focus);
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
case GTK_DIR_TAB_BACKWARD:
|
||||
if ((new_focus = find_last_event_widget (self)))
|
||||
return gtk_widget_grab_focus (new_focus);
|
||||
else
|
||||
return FALSE;
|
||||
case GTK_DIR_TAB_BACKWARD:
|
||||
if ((new_focus = find_last_event_widget (self)))
|
||||
return gtk_widget_grab_focus (new_focus);
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (GCAL_IS_EVENT_WIDGET (focused))
|
||||
|
||||
Reference in New Issue
Block a user