diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index d838057..fce9334 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1238,6 +1238,17 @@ void yon_main_window_create(main_window *widgets){ set_locales_list(widgets); } +gboolean yon_maximize_start(main_window *widgets){ + gtk_window_maximize(GTK_WINDOW(widgets->MainWindow)); + return G_SOURCE_REMOVE; +} + +void *yon_maximize(main_window *widgets){ + g_usleep(G_USEC_PER_SEC/10); + g_idle_add((GSourceFunc)yon_maximize_start,widgets); + return NULL; +} + /**yon_main_window_complete(main_window *widgets) * [EN] * @@ -1290,7 +1301,8 @@ int main(int argc, char *argv[]){ char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); if (access(path,F_OK)){ fullscreen = 1; - gtk_window_maximize(GTK_WINDOW(widgets->MainWindow)); + g_thread_new("fullscreen",(GThreadFunc)yon_maximize,widgets); + } yon_window_config_load(path); yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index f1d74d1..56c49d3 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1209,4 +1209,6 @@ int yon_layouts_get(); void on_link(GtkWidget *self, char* uri, gpointer ); void on_source_changed(GtkComboBox *self); void yon_focus_set(GtkWidget *,GtkWidget *target); -void on_main_window_close(GtkWidget*, main_window *); \ No newline at end of file +void on_main_window_close(GtkWidget*, main_window *); +gboolean yon_maximize_start(main_window *widgets); +void *yon_maximize(main_window *widgets); \ No newline at end of file