summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gui_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/gui_thread.h')
-rw-r--r--gtk2_ardour/gui_thread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/gui_thread.h b/gtk2_ardour/gui_thread.h
index 22381e3536..1f53f97004 100644
--- a/gtk2_ardour/gui_thread.h
+++ b/gtk2_ardour/gui_thread.h
@@ -2,6 +2,7 @@
#define __ardour_gtk_gui_thread_h__
#include <gtkmm2ext/gtk_ui.h>
+#include <pbd/crossthread.h>
#define ENSURE_GUI_THREAD(slot) \
if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\
@@ -9,4 +10,8 @@
return;\
}
+#define GTK_SAFE(theSlot) crossthread_safe (Gtkmm2ext::UI::instance()->thread_id(),\
+ *Gtkmm2ext::UI::instance(), \
+ (theSlot))
+
#endif /* __ardour_gtk_gui_thread_h__ */