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

Make SDL work on wlc (wl_registry@2: error 0: invalid version for global wl_data_device_manager (4): have 2, wanted 3) #281

Open
L-as opened this issue Oct 2, 2017 · 10 comments

Comments

@L-as
Copy link
Contributor

L-as commented Oct 2, 2017

I don't exactly know how these versions work and all that (not much info on the web), but it seems to be related to wlc/src/compositor/seat/data.c line 174 and line 235.

If someone could give some hints as to how I could implement it myself, I'd be glad too.

This is BTW on with wlc 0.0.10, sway 0.14, and it happens when running an SDL program (Natural Selection 2) using the wayland videodriver.

Will be hard to reproduce for others, but here are the steps:
Change to beta branch on steam
Go into x64 subfolder
Fix incorrect symlinks to fmod libs
run program as SDL_VIDEODRIVER=wayland ./ns2_linux

@ddevault
Copy link
Collaborator

ddevault commented Oct 2, 2017

The data device manager API is specified in wayland-server-protocol.h, and specifies which features appeared in which version. You should take a look at that to find out what we need to shore up. Note that wlc doesn't support drag and drop, so you may be limited in what you can accomplish beyond placating clients unless you intend to implement DnD.

@L-as
Copy link
Contributor Author

L-as commented Oct 2, 2017

thanks

@L-as
Copy link
Contributor Author

L-as commented Oct 2, 2017

So I took a look into this, and wl_data_device_manager_interface doesn't seem to have any methods that say @since 3. Am I missing something here? Or do I have to implement all @since 3 methods? (which there are 8 of)

@ddevault
Copy link
Collaborator

ddevault commented Oct 2, 2017

Check the implementations of the child objects - wl_data_offer, wl_data_source, and wl_data_device. These all inherit the whole interface's version number iiuc.

@L-as
Copy link
Contributor Author

L-as commented Oct 13, 2017

So I tried to implement this, since I had time, but I'm having problems.
I get this error: wl_display@1: error 2: no memory
This is after implementing set_actions and finish for data_offer and data_source.

Commits are available at https://github.com/Laaas/wlc, do you see anything wrong with them?

@L-as
Copy link
Contributor Author

L-as commented Oct 13, 2017

Also yes, I do realise that the set_actions ones aren't really doing anything useful, but I have no idea where to actually use the acquired values.

@ddevault
Copy link
Collaborator

It isn't immediately apparent to me. Have you tried stepping through it with a debugger?

@L-as L-as changed the title wl_registry@2: error 0: invalid version for global wl_data_device_manager (4): have 2, wanted 3 Make SDL work on wlc/wl_registry@2: error 0: invalid version for global wl_data_device_manager (4): have 2, wanted 3 Oct 14, 2017
@L-as
Copy link
Contributor Author

L-as commented Oct 14, 2017

I didn't find much using a debugger, because it isn't a fatal error. I did test it on weston though, and it worked fine there. Going to take a look at their implementation.

@L-as
Copy link
Contributor Author

L-as commented Oct 14, 2017

Oh wow, I'm stupid. I forgot to enable debugging and verbose logging.

@L-as L-as changed the title Make SDL work on wlc/wl_registry@2: error 0: invalid version for global wl_data_device_manager (4): have 2, wanted 3 Make SDL work on wlc (wl_registry@2: error 0: invalid version for global wl_data_device_manager (4): have 2, wanted 3) Oct 14, 2017
@L-as
Copy link
Contributor Author

L-as commented Oct 14, 2017

Well, I've tested it a bit and SDL seems to start up. Don't know if it completely works though, have to test it some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants