-
-
Notifications
You must be signed in to change notification settings - Fork 52
Add some stubs for newer protocol bits in the data manager, claiming support for protocol version 3. #53
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
base: master
Are you sure you want to change the base?
Conversation
and claim support for protocol version 3. This is enough to allow some SDL2 applications to work.
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.
Thanks for the PR! I'm curious why SDL2 requires these features in wl_data_device
. Do you have any links to the relevant code?
I'll need to do a bit of reading of the spec before merging this. Sorry about the wait.
libswc/data_device.c
Outdated
@@ -59,6 +67,7 @@ set_selection(struct wl_client *client, struct wl_resource *resource, struct wl_ | |||
static const struct wl_data_device_interface data_device_impl = { | |||
.start_drag = start_drag, | |||
.set_selection = set_selection, | |||
.release = release |
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.
I think this should be .release = destroy_resource
, which will call wl_resource_destroy
, which calls the destructor (data_device_destroy
), and then destroys the wl_resource
.
I think it's just requesting version 3 for no good reason. It's also just defining stubs for these capabilities in https://github.com/spurious/SDL-mirror/blob/master/src/video/wayland/SDL_waylandevents.c#L681
https://github.com/spurious/SDL-mirror/blob/master/src/video/wayland/SDL_waylandvideo.c#L384 I should correct my first post that this actually allows (all?) SDL2 applications to work, except those also using GLEW. I previously had a bug that was preventing non-GL applications from running, but that seems resolved. So you can run milkytracker, Dungeon Crawl, mpv, etc. |
Thanks for the links. SDL should definitely not be trying to bind version 3 of wl_data_device_manager if the compositor advertises a lower version. That will always result in a protocol error. I submitted a patch to fix that at https://bugzilla.libsdl.org/show_bug.cgi?id=4924. It looks like SDL does use the v3 request On the swc side, I went ahead and pushed support for v2 first, since that was an easy change. For v3, apart from the two stubs you added, I think we also need add |
This is enough to allow some SDL2 applications to work, e.g. quakespasm. It was done in my fork of swc that adds support for NetBSD and a new "seat" for the wscons input API, in case you're interested in that.