mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Prefer key-event dispatch over emulated events for VST plugins.
This commit is contained in:
parent
197f5460df
commit
3b1d9193ba
2 changed files with 8 additions and 3 deletions
|
|
@ -141,10 +141,10 @@ LXVSTPluginUI::forward_key_event (GdkEventKey* gdk_key)
|
||||||
xev.xany.send_event = true; /* pretend we are using XSendEvent */
|
xev.xany.send_event = true; /* pretend we are using XSendEvent */
|
||||||
xev.xany.display = GDK_WINDOW_XDISPLAY (gdk_window->gobj());
|
xev.xany.display = GDK_WINDOW_XDISPLAY (gdk_window->gobj());
|
||||||
|
|
||||||
if (!_vst->state()->eventProc) {
|
if (_vst->state()->eventProc) {
|
||||||
XSendEvent (xev.xany.display, xev.xany.window, TRUE, mask, &xev);
|
|
||||||
} else {
|
|
||||||
_vst->state()->eventProc (&xev);
|
_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
|
void
|
||||||
WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
|
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) {
|
if (ev->type != GDK_KEY_PRESS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -156,6 +160,7 @@ WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
|
||||||
fst->n_pending_keys++;
|
fst->n_pending_keys++;
|
||||||
|
|
||||||
pthread_mutex_unlock (&fst->lock);
|
pthread_mutex_unlock (&fst->lock);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue