Resize main window early to fix load dialog position when triggered via commandline
authorAlexander Koenig <alex@lisas.de>
Sun, 14 Feb 2021 16:12:31 +0000 (17:12 +0100)
committerAlexander Koenig <alex@lisas.de>
Sun, 14 Feb 2021 16:12:31 +0000 (17:12 +0100)
src/tX_maingui.cc

index 078fb157c8af01ad6d88dde388f5b9dc07b8fcd8..15a326712dde7313b4fd2269eca24bb9a95fe21e 100644 (file)
@@ -1295,6 +1295,7 @@ void create_maingui(int x, int y) {
 
     gtk_window_set_title(GTK_WINDOW(main_window), "terminatorX");
 
+    gtk_window_set_default_size(GTK_WINDOW(main_window), x, y);
     gtk_widget_realize(main_window);
 
     GtkWidget* posLabel = gtk_label_new("Pos:");
@@ -1535,7 +1536,6 @@ void create_maingui(int x, int y) {
 
     /* END GUI */
 
-    gtk_window_set_default_size(GTK_WINDOW(main_window), x, y);
     gtk_widget_set_sensitive(grab_button, 0);
 
     new_table(NULL, NULL); // to give the user something to start with ;)