From: Antoine Fontaine Date: Wed, 29 Sep 2021 13:56:56 +0000 (+0200) Subject: Focus "ok" button on modal windows by default X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7e8f20bf007190a80b919a13aee8fa1bfa9dc509;p=xonotic%2Fnetradiant.git Focus "ok" button on modal windows by default --- diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 66470543..dc4ef7af 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -172,6 +172,7 @@ ui::Window create_simple_modal_dialog_window( const char* title, ModalDialog& di auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &dialog ); alignment.add(button); + gtk_widget_grab_focus (button); return window; }