Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VST GUI does not work under JUCE-based hosts #22

Closed
nickdowell opened this issue Aug 16, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@nickdowell
Copy link
Member

commented Aug 16, 2016

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

@nickdowell nickdowell added the bug label Aug 16, 2016

@nickdowell nickdowell added this to the 1.7.0 milestone Aug 16, 2016

@nickdowell nickdowell self-assigned this Aug 16, 2016

@nickdowell

This comment has been minimized.

Copy link
Member Author

commented Aug 27, 2016

Commit 7796664 fixes mouse handling; knobs and buttons now work.
Pop-up menus are currently broken, though.
Investigation continues...

nickdowell added a commit that referenced this issue Aug 27, 2016

nickdowell added a commit that referenced this issue Aug 28, 2016

nickdowell added a commit that referenced this issue Aug 28, 2016

fix popup menus under JUCE VST
gtk_menu_popup() was failing when called from button-press-event
handler, but works from button-release-event

#22

@nickdowell nickdowell closed this Oct 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.