diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-29 21:58:44 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-29 21:58:44 +0000 |
commit | d367d94c7febe766afc7356e874ba4eb36fcae48 (patch) | |
tree | 55f85dbea41a7ac98cf0b705fd436c25db0aa37a /libs/fst/vstwin.c | |
parent | fa02a4e61c0dbfae1c2e0f12260c5a97b34928d1 (diff) |
Extremely hacky but somewhat functional passing of keys to VST plugin UIs. Sort-of fixes #3630.
git-svn-id: svn://localhost/ardour2/branches/3.0@8371 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/fst/vstwin.c')
-rw-r--r-- | libs/fst/vstwin.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index 007a825d53..f1553821ad 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -34,11 +34,11 @@ static int gui_quit = 0; static LRESULT WINAPI my_window_proc (HWND w, UINT msg, WPARAM wp, LPARAM lp) { -#if 0 +#if 0 if (msg != WM_TIMER) { fst_error ("window callback handler, msg = 0x%x win=%p\n", msg, w); } -#endif +#endif switch (msg) { case WM_KEYUP: @@ -73,6 +73,7 @@ fst_new () fst->want_program = -1; fst->want_chunk = 0; fst->current_program = -1; + fst->pending_key = 0; return fst; } @@ -204,10 +205,26 @@ again: } pthread_mutex_unlock (&fst->lock); + } pthread_mutex_unlock (&plugin_mutex); + + } + + + for (fst = fst_first; fst; fst = fst->next) { + if (fst->pending_key) { + msg.message = WM_CHAR; + msg.hwnd = GetFocus (); + msg.wParam = fst->pending_key; + msg.lParam = 0; + DispatchMessageA (&msg); + fst->pending_key = 0; + } + } + } return 0; |