From 35580dc40ceca2d907b1f76f994f755d38fdc3a7 Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Thu, 25 Jun 2026 07:15:11 -0400 Subject: [PATCH] event-editor/event-editor-dialog: Explicitly grab focus on summary section As described in the previous commit, this approach is more predictable because the focus is decided in the same place. The focus grabbing behavior is set after notifying the `GcalEventEditorDialog:event` property as otherwise it would not select the entire text in some occasions. Part-of: --- src/gui/event-editor/gcal-event-editor-dialog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/event-editor/gcal-event-editor-dialog.c b/src/gui/event-editor/gcal-event-editor-dialog.c index 85cacf58..9d0ef7e3 100644 --- a/src/gui/event-editor/gcal-event-editor-dialog.c +++ b/src/gui/event-editor/gcal-event-editor-dialog.c @@ -696,9 +696,6 @@ gcal_event_editor_dialog_set_event (GcalEventEditorDialog *self, self->event_is_new = new_event; gtk_widget_set_visible (self->delete_group, !new_event && self->writable); - if (!self->writable) - gtk_widget_grab_focus (self->done_button); - /* fill attendees list */ self->attendees_model = gcal_event_get_attendees (self->event); @@ -713,5 +710,10 @@ out: g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_EVENT]); + if (self->writable) + gtk_widget_grab_focus (GTK_WIDGET (self->summary_section)); + else + gtk_widget_grab_focus (self->done_button); + GCAL_EXIT; }