-
Notifications
You must be signed in to change notification settings - Fork 5
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
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. |
@@ -83,7 +83,9 @@ x_window_is_valid(SuilX11Wrapper* socket) | |||
return true; | |||
} | |||
} | |||
XFree(children); | |||
if (children) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? XFree(3): "If data is NULL, no operation is performed."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://tronche.com/gui/x/xlib/display/XFree.html
A NULL pointer cannot be passed to this function.
Maybe xlib vs. xcb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Weird.
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