Prefer key-event dispatch over emulated events for VST plugins.
This commit is contained in:
parent
197f5460df
commit
3b1d9193ba
@ -141,10 +141,10 @@ LXVSTPluginUI::forward_key_event (GdkEventKey* gdk_key)
|
||||
xev.xany.send_event = true; /* pretend we are using XSendEvent */
|
||||
xev.xany.display = GDK_WINDOW_XDISPLAY (gdk_window->gobj());
|
||||
|
||||
if (!_vst->state()->eventProc) {
|
||||
XSendEvent (xev.xany.display, xev.xany.window, TRUE, mask, &xev);
|
||||
} else {
|
||||
if (_vst->state()->eventProc) {
|
||||
_vst->state()->eventProc (&xev);
|
||||
} else if (!dispatch_effeditkey (gdk_key)) {
|
||||
XSendEvent (xev.xany.display, xev.xany.window, TRUE, mask, &xev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,10 @@ WindowsVSTPluginUI::package (Gtk::Window& win)
|
||||
void
|
||||
WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
|
||||
{
|
||||
if (dispatch_effeditkey (ev)) {
|
||||
return;
|
||||
}
|
||||
#ifndef PLATFORM_WINDOWS /* linux + wine ; libs/fst/vstwin.c */
|
||||
if (ev->type != GDK_KEY_PRESS) {
|
||||
return;
|
||||
}
|
||||
@ -156,6 +160,7 @@ WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
|
||||
fst->n_pending_keys++;
|
||||
|
||||
pthread_mutex_unlock (&fst->lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user