From bc89fe0147c04b67141936d109c00dfd4d69cc4b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 12 Dec 2008 14:43:24 +0000 Subject: most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/popup.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libs/gtkmm2ext/popup.cc') diff --git a/libs/gtkmm2ext/popup.cc b/libs/gtkmm2ext/popup.cc index 0b150eefe1..2d586d0317 100644 --- a/libs/gtkmm2ext/popup.cc +++ b/libs/gtkmm2ext/popup.cc @@ -22,6 +22,7 @@ #include #include +#include using namespace std; using namespace Gtk; @@ -83,9 +84,17 @@ PopUp::remove () } } +#define ENSURE_GUI_THREAD(slot) \ + if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\ + Gtkmm2ext::UI::instance()->call_slot ((slot));\ + return;\ + } + void PopUp::touch () { + ENSURE_GUI_THREAD (mem_fun (*this, &PopUp::touch)); + if (is_visible ()) { remove (); } else { -- cgit v1.2.3