summaryrefslogtreecommitdiff
path: root/gtk2_ardour/lxvst_plugin_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-11-01 01:27:30 +0100
committerRobin Gareus <robin@gareus.org>2018-11-01 01:27:30 +0100
commitd9fcab88f01f7ada6f52482f1ee60fc41c91235c (patch)
tree55f04fe5faab00bfdf769931c44c7db9901642ee /gtk2_ardour/lxvst_plugin_ui.cc
parenta79fe239355b8c6f4e86da2eb1eec43c6c4dd052 (diff)
Fix key-forwarding to linuxVST UIs
Tested with VeeSeeVST
Diffstat (limited to 'gtk2_ardour/lxvst_plugin_ui.cc')
-rw-r--r--gtk2_ardour/lxvst_plugin_ui.cc5
1 files 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);