summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-18 04:24:29 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-18 04:24:29 (EDT)
commit6a759b714129468cd1cd7b081cd795697c7a16e8 (patch)
tree2e1c052419f9ba9745351219dffcab88d6c5af19 /src
parent864f0056127bd2e70aaf9537592f3128f50d63c5 (diff)
downloadmarquee-6a759b714129468cd1cd7b081cd795697c7a16e8.zip
marquee-6a759b714129468cd1cd7b081cd795697c7a16e8.tar.gz
marquee-6a759b714129468cd1cd7b081cd795697c7a16e8.tar.bz2
MqApplication, MqWindow: Focus on OK button of quit/close warning dialogs
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;