From d9fcab88f01f7ada6f52482f1ee60fc41c91235c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 1 Nov 2018 01:27:30 +0100 Subject: [PATCH] Fix key-forwarding to linuxVST UIs Tested with VeeSeeVST --- gtk2_ardour/lxvst_plugin_ui.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/lxvst_plugin_ui.cc b/gtk2_ardour/lxvst_plugin_ui.cc index 25ee0f2aea..baad5722ad 100644 --- a/gtk2_ardour/lxvst_plugin_ui.cc +++ b/gtk2_ardour/lxvst_plugin_ui.cc @@ -116,7 +116,7 @@ LXVSTPluginUI::forward_key_event (GdkEventKey* gdk_key) mask = KeyPressMask; break; case GDK_KEY_RELEASE: - xev.xany.type = KeyPress; + xev.xany.type = KeyRelease; mask = KeyReleaseMask; break; default: @@ -133,14 +133,13 @@ LXVSTPluginUI::forward_key_event (GdkEventKey* gdk_key) xev.xkey.x_root = 0; xev.xkey.y_root = 0; xev.xkey.root = gdk_x11_get_default_root_xwindow(); - xev.xkey.window = _vst->state()->xid; + xev.xkey.window = _vst->state()->linux_plugin_ui_window ? _vst->state()->linux_plugin_ui_window : _vst->state()->xid; xev.xkey.subwindow = None; xev.xkey.time = gdk_key->time; xev.xany.serial = 0; /* we don't have one */ xev.xany.send_event = true; /* pretend we are using XSendEvent */ xev.xany.display = GDK_WINDOW_XDISPLAY (gdk_window->gobj()); - xev.xany.window = _vst->state()->xid; if (!_vst->state()->eventProc) { XSendEvent (xev.xany.display, xev.xany.window, TRUE, mask, &xev);