diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-06 20:09:35 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-06 20:09:35 +0000 |
commit | 27cd4034bdfd6ad0218e275bcf417b5bb8495259 (patch) | |
tree | 219c6066f204836870c293e95410d23aa90d4add | |
parent | 1161fa8731dfe94b5c75126af8e88ca782ca6d51 (diff) |
fix misdesign of VST GUI thread
git-svn-id: svn://localhost/ardour2/trunk@1428 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 3 | ||||
-rw-r--r-- | libs/fst/fst.h | 1 | ||||
-rw-r--r-- | libs/fst/vstwin.c | 12 |
3 files changed, 12 insertions, 4 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 54d6393506..4d9f4a73fa 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -96,13 +96,14 @@ PluginUIWindow::PluginUIWindow (boost::shared_ptr<PluginInsert> insert, bool scr _pluginui = pu; get_vbox()->add (*pu); + set_wmclass (X_("ardour_plugin_editor"), "Ardour"); + signal_map_event().connect (mem_fun (*pu, &LadspaPluginUI::start_updating)); signal_unmap_event().connect (mem_fun (*pu, &LadspaPluginUI::stop_updating)); } set_position (Gtk::WIN_POS_MOUSE); set_name ("PluginEditor"); - set_wmclass (X_("ardour_plugin_editor"), "Ardour"); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this))); diff --git a/libs/fst/fst.h b/libs/fst/fst.h index 9055eac620..493cb2e572 100644 --- a/libs/fst/fst.h +++ b/libs/fst/fst.h @@ -82,6 +82,7 @@ extern "C" { #endif extern int fst_init (); +extern void fst_finish (); extern FSTHandle* fst_load (const char*); extern int fst_unload (FSTHandle*); diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index 77fdfccd14..0ee34b70b4 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -326,12 +326,12 @@ DWORD WINAPI gui_event_loop (LPVOID param) fst_error ("cannot set timer on dummy window"); } - while (true) { + while (1) { GetMessageA (&msg, NULL, 0,0); - if (msg.message == WM_QUIT) { - cerr << "WM QUIT received\n"; + if (msg.message == WM_SYSTEMERROR) { + /* sent when this thread is supposed to exist */ break; } @@ -418,6 +418,12 @@ fst_init () return 0; } +void +fst_finish () +{ + PostThreadMessageA (gui_thread_id, WM_SYSTEMERROR, 0, 0); +} + int fst_run_editor (FST* fst) { |