Focus "ok" button on modal windows by default 186/head
authorAntoine Fontaine <antoine.fontaine@epfl.ch>
Wed, 29 Sep 2021 13:56:56 +0000 (15:56 +0200)
committerAntoine Fontaine <antoine.fontaine@epfl.ch>
Wed, 29 Sep 2021 13:59:17 +0000 (15:59 +0200)
libs/gtkutil/dialog.cpp

index 66470543c48e307c5e0573721c4e90cccac410f9..dc4ef7af6bb7cfa4791eb7ebea30add58b3d6253 100644 (file)
@@ -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;
 }