put JACK time master option into Session -> Properties -> Timecode, and fully remove...
[ardour.git] / gtk2_ardour / vst_pluginui.cc
index b6902445f367d2d2199ac5f20c3e542dd3f3c3e3..8548c535d7bcd125d69b0cb788a7e2807c4ed848 100644 (file)
@@ -39,6 +39,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<
 
        preset_box.set_spacing (6);
        preset_box.set_border_width (6);
+       preset_box.pack_end (focus_button, false, false);
        preset_box.pack_end (bypass_button, false, false, 10);
        preset_box.pack_end (delete_button, false, false);
        preset_box.pack_end (save_button, false, false);
@@ -134,6 +135,52 @@ VSTPluginUI::configure_handler (GdkEventConfigure* ev, Gtk::Socket *socket)
        return false;
 }
 
+void
+VSTPluginUI::forward_key_event (GdkEventKey* ev)
+{
+       if (ev->type == GDK_KEY_PRESS) {
+
+               FST* fst = vst->fst ();
+               pthread_mutex_lock (&fst->lock);
+
+               if (fst->n_pending_keys == (sizeof (fst->pending_keys) * sizeof (FSTKey))) {
+                       /* buffer full */
+                       return;
+               }
+
+               int special_windows_key = 0;
+               int character_windows_key = 0;
+
+               switch (ev->keyval) {
+               case GDK_Left:
+                       special_windows_key = 0x25;
+                       break;
+               case GDK_Right:
+                       special_windows_key = 0x27;
+                       break;
+               case GDK_Up:
+                       special_windows_key = 0x26;
+                       break;
+               case GDK_Down:
+                       special_windows_key = 0x28;
+                       break;
+               case GDK_Return:
+               case GDK_KP_Enter:
+                       special_windows_key = 0xd;
+                       break;
+               default:
+                       character_windows_key = ev->keyval;
+                       break;
+               }
+
+               fst->pending_keys[fst->n_pending_keys].special = special_windows_key;
+               fst->pending_keys[fst->n_pending_keys].character = character_windows_key;
+               fst->n_pending_keys++;
+
+               pthread_mutex_unlock (&fst->lock);
+       }
+}
+
 typedef int (*error_handler_t)( Display *, XErrorEvent *);
 static Display *the_gtk_display;
 static error_handler_t wine_error_handler;