X11 Drag/Drop Proxy#12
Conversation
> XDND drag-and-drop does not work with reparented external windows, > since messages are exchanged with the toplevel window only. > This is done for performance reasons (https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html#idm46049203496608) To address this the XDND specification allows to proxy events to child windows: https://www.freedesktop.org/wiki/Specifications/XDND/ This is towards fixing Drag/Drop to plugin UIs: lsp-plugins/lsp-plugins#67 In Ardour's case events have to be proxied from the grand-parent Window to the embedded child.
|
Another data-point. JUCE lets the plugin set this up (not the host). Same approach XdndProxy. https://forum.juce.com/t/patch-implements-drag-and-drop-for-plugin-windows-on-linux/35203 For LV2 however I think we should follow the mantra: If the host can do it, complexity should rather be on the host side. What do you think? libsuil could check if the child window is XdndAware before setting up a proxy, but as far as I can tell there's no downside to unconditionally setting XdndProxy. |
| } | ||
| } | ||
| XFree(children); | ||
| if (children) { |
There was a problem hiding this comment.
Why? XFree(3): "If data is NULL, no operation is performed."
There was a problem hiding this comment.
https://tronche.com/gui/x/xlib/display/XFree.html
A NULL pointer cannot be passed to this function.
Maybe xlib vs. xcb?
|
Cool, thanks. I agree this is the best place for it, if possible, which it seems to be... Currently traveling, I'll give it a try and merge it when I get home. |
|
Seems to work fine for me. Merged with some condensing as 7c3e3d6, thanks. |
This adds support for Drag/Drop to reparented X11 windows.
A working example plugin to test/debug X11 events: https://github.com/x42/debug.lv2
See also lsp-plugins/lsp-plugins#67