Fix crash when X11 is not available for VST UIs
[ardour.git] / gtk2_ardour / plugin_scan_dialog.cc
index 67d720045f79b6be0eebb0ed1b322e934ffdb9a7..a3ba2c16c886d7cecd43812b06a53cb7c708dd00 100644 (file)
@@ -84,12 +84,17 @@ PluginScanDialog::start ()
         * read this and think about it carefully if you are confused.
         *
         * Plugin discovery must take place in the main thread of the
-        * process. This is not true for all plugin APIs but it is true for VST
-        * and AU. This means that the PluginManager::refresh() call MUST be
-        * made from the main thread (typically the GUI thread, but certainly
-        * the thread running main()). Failure to do this will cause crashes,
-        * undefined behavior and other undesirable stuff (because plugin APIs
-        * failed to specify this aspect of the host behavior).
+        * process. This is not true for all plugin APIs but it is true for
+        * VST.  For AU, although plugins themselves do not care, Apple decided
+        * that Cocoa must be "invoked" from the main thread. Since the plugin
+        * might show a "registration" GUI, discovery must be done
+        * in the main thread.
+        *
+        * This means that the PluginManager::refresh() call MUST be made from
+        * the main thread (typically the GUI thread, but certainly the thread
+        * running main()). Failure to do this will cause crashes, undefined
+        * behavior and other undesirable stuff (because plugin APIs failed to
+        * specify this aspect of the host behavior).
         *
         * The ::refresh call is likely to be slow, particularly in the case of
         * VST(2) plugins where we are forced to load the shared object do
@@ -196,10 +201,8 @@ PluginScanDialog::message_handler (std::string type, std::string plugin, bool ca
                hide();
                connections.drop_connections ();
        } else {
-               if (verbose) {
-                       message.set_text (type + ": " + Glib::path_get_basename(plugin));
-                       show();
-               }
+               message.set_text (type + ": " + Glib::path_get_basename(plugin));
+               show();
        }
 
        if (!can_cancel || !cancelled) {