aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_gtk2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jalv_gtk2.c')
-rw-r--r--src/jalv_gtk2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jalv_gtk2.c b/src/jalv_gtk2.c
index 6e4e9cd..d1a4a00 100644
--- a/src/jalv_gtk2.c
+++ b/src/jalv_gtk2.c
@@ -127,6 +127,9 @@ jalv_open_ui(Jalv* jalv,
if (instance) {
GtkWidget* widget = (GtkWidget*)suil_instance_get_widget(instance);
gtk_container_add(GTK_CONTAINER(alignment), widget);
+
+ g_timeout_add(1000 / JALV_UI_UPDATE_HZ,
+ (GSourceFunc)jalv_emit_ui_events, jalv);
} else {
GtkWidget* button = gtk_button_new_with_label("Close");
@@ -143,9 +146,6 @@ jalv_open_ui(Jalv* jalv,
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show_all(window);
- g_timeout_add(1000 / JALV_UI_UPDATE_HZ,
- (GSourceFunc)jalv_emit_ui_events, jalv);
-
gtk_main();
sem_post(jalv->done);
return 0;