diff -r 822fcb83bdf1 -r 8c028965410a ui/gtk/window.c --- a/ui/gtk/window.c Tue Oct 29 11:52:01 2024 +0100 +++ b/ui/gtk/window.c Tue Oct 29 17:52:06 2024 +0100 @@ -659,13 +659,21 @@ #define DEFAULT_BUTTON(window, button) gtk_window_set_default_widget(GTK_WINDOW(window), button) #else #define HEADERBAR_SHOW_CLOSEBUTTON(headerbar, set) gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(headerbar), set) -#define DEFAULT_BUTTON(window, button) gtk_window_set_default(GTK_WINDOW(window), button) +#define DEFAULT_BUTTON(window, button) gtk_widget_set_can_default(button, TRUE); gtk_window_set_default(GTK_WINDOW(window), button) #endif UiObject* ui_dialog_window_create(UiObject *parent, UiDialogWindowArgs args) { GtkWidget *dialog = DIALOG_NEW(); + if(args.width > 0 || args.height > 0) { + gtk_window_set_default_size( + GTK_WINDOW(dialog), + args.width, + args.height); + } + + gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(parent->widget)); if(args.modal != UI_OFF) { gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);