-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Hosts that exhibit this problem include:
The amsynth GUI displays fine but mouse clicks are not detected.
This is because GTK button press events are not being generated - using gdk_event_handler_set to inspect all events reveals that GDK is not emitting GDK_BUTTON_PRESS events.
An initial round of debugging points to this being an issue with the way JUCE forwards XEvents to the plugin's child window. JUCE uses XSendEvent (see juce_VSTPluginFormat.cpp) but GDK seems to ignore mouse clicks that have the send_event flag set - whether this is intentional or not I do not yet know.
A crude workaround is to not reparent amsynth's GUI window inside the JUCE-owned parent. Event handling then works fine, but this leads to two top-level windows being seen.
Installing an _XEventProc may offer a solution, but so far attempts to get this working on a 64-bit machine have caused crashes. It's not clear whether this mechanism is widely used and therefore reliably implemented in hosts.
Further investigation required...
- _XEventProc 64-bit support
- mouse event handling
- popup menus
- parameter value tooltips