From 0f1e403b0cab6d364abfb894ed209082429a74dd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 11 May 2021 12:42:05 -0400 Subject: Register idle callback after all other setup --- src/Patchage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Patchage.cpp') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 7387b36..a4bb960 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -346,10 +346,6 @@ Patchage::Patchage(Options options) _canvas->widget().grab_focus(); - // Idle callback, check if we need to refresh - Glib::signal_timeout().connect(sigc::mem_fun(this, &Patchage::idle_callback), - 100); - #ifdef PATCHAGE_GTK_OSX // Set up Mac menu bar GtkosxApplication* osxapp = static_cast( @@ -368,6 +364,10 @@ Patchage::Patchage(Options options) osxapp, "NSApplicationWillTerminate", G_CALLBACK(terminate_cb), this); gtkosx_application_ready(osxapp); #endif + + // Set up an idle callback to process events and update the GUI if necessary + Glib::signal_timeout().connect(sigc::mem_fun(this, &Patchage::idle_callback), + 100); } Patchage::~Patchage() -- cgit v1.2.1