summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.c2
-rw-r--r--src/window.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/application.c b/src/application.c
index 13fba19..c11d52c 100644
--- a/src/application.c
+++ b/src/application.c
@@ -164,6 +164,8 @@ mq_application_quit(MqApplication *application, GtkWindow *parent)
hbox);
g_signal_connect(dialog, "response",
G_CALLBACK(quit_confirm_response_cb), NULL);
+ gtk_widget_grab_focus(gtk_dialog_get_widget_for_response(
+ GTK_DIALOG(dialog), GTK_RESPONSE_OK));
gtk_widget_show_all(dialog);
return;
diff --git a/src/window.c b/src/window.c
index 8456c9f..b1fc251 100644
--- a/src/window.c
+++ b/src/window.c
@@ -136,6 +136,8 @@ delete_event_cb(GtkWindow *widget, GdkEvent G_GNUC_UNUSED *event,
hbox);
g_signal_connect(dialog, "response",
G_CALLBACK(close_confirm_response_cb), window);
+ gtk_widget_grab_focus(gtk_dialog_get_widget_for_response(
+ GTK_DIALOG(dialog), GTK_RESPONSE_OK));
gtk_widget_show_all(dialog);
return TRUE;