extend strict-i/o to include route outputs.
[ardour.git] / gtk2_ardour / plugin_ui.cc
index 833055eff7aa80a4c7c6eaad9655757688524083..b1af891217ae8c174307d45b6b266c709502999d 100644 (file)
@@ -58,6 +58,7 @@
 #endif
 
 #include "ardour_window.h"
+#include "ardour_ui.h"
 #include "prompter.h"
 #include "plugin_ui.h"
 #include "utils.h"
@@ -177,7 +178,7 @@ PluginUIWindow::on_show ()
        }
 
        if (_pluginui) {
-#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
+#if defined (HAVE_AUDIOUNITS) && defined(__APPLE__)
                 if (pre_deactivate_x >= 0) {
                         move (pre_deactivate_x, pre_deactivate_y);
                 }
@@ -192,7 +193,7 @@ PluginUIWindow::on_show ()
 void
 PluginUIWindow::on_hide ()
 {
-#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
+#if defined (HAVE_AUDIOUNITS) && defined(__APPLE__)
         get_position (pre_deactivate_x, pre_deactivate_y);
 #endif
 
@@ -292,7 +293,7 @@ PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert>)
 }
 
 void
-#ifdef GTKOSX
+#ifdef __APPLE__
 PluginUIWindow::app_activated (bool yn)
 #else
 PluginUIWindow::app_activated (bool)
@@ -361,27 +362,26 @@ PluginUIWindow::on_key_press_event (GdkEventKey* event)
                        }
                }
                return true;
-       } else {
-               /* for us to be getting key press events, there really
-                  MUST be a _pluginui, but just to be safe, check ...
-               */
+       }
+       /* for us to be getting key press events, there really
+          MUST be a _pluginui, but just to be safe, check ...
+       */
 
-               if (_pluginui) {
-                       _pluginui->grab_focus();
-                       if (_pluginui->non_gtk_gui()) {
-                               /* pass editor window as the window for the event
-                                  to be handled in, not this one, because there are
-                                  no widgets in this window that we want to have
-                                  key focus.
-                               */
-                               return relay_key_press (event, 0);
-                       } else {
-                               return relay_key_press (event, this);
-                       }
+       if (_pluginui) {
+               _pluginui->grab_focus();
+               if (_pluginui->non_gtk_gui()) {
+                       /* pass main window as the window for the event
+                          to be handled in, not this one, because there are
+                          no widgets in this window that we want to have
+                          key focus.
+                       */
+                       return relay_key_press (event, &ARDOUR_UI::instance()->main_window());
                } else {
-                       return false;
+                       return relay_key_press (event, this);
                }
        }
+
+       return false;
 }
 
 bool