On ArchLinux, SDL2 applications default to the X11 backend, but the Wayland backend can be forced with the "SDL_VIDEODRIVER=wayland" parameter. When I use this parameter with SDL games such as Neverball or Xonotic, the game doesn't start and I have this output: "wl_registry@2: error 0: invalid version for global wl_data_device_manager (8): have 2, wanted 3 Failure to initialize SDL (The video driver did not add any displays)" I'm not sure if it's a bug or a known limitation to the current Plasma session?
To a certain degree that's probably a bug in SDL. KWayland doesn't support version 3 yet, the only difference to version 2 is support for some additional drag and drop features. I doubt that SDL needs those. But I started to implement version 3 and with the current patchset got the game to run.
Git commit a715a6cd1fe30acc5dde6d820136e67551fb36f6 by Martin Flöser. Committed on 26/12/2017 at 19:41. Pushed by graesslin into branch 'master'. Add support for version 3 of data device manager interface Summary: The main difference compared to version 2 is additional drag and drop actions. The source and destination can negotiate whether the data should be copied or moved or the user should be asked for either or. This seems to be important for GTK, but is not yet implemented in Qt. The main motivation for adding support is that it is required by SDL to launch on Wayland. Test Plan: Extended test case, sdl apps now start Reviewers: #frameworks, #plasma, #kwin Subscribers: plasma-devel Tags: #plasma_on_wayland, #frameworks Differential Revision: https://phabricator.kde.org/D9136 M +26 -3 autotests/client/test_drag_drop.cpp M +4 -1 src/client/datadevice.cpp M +14 -0 src/client/datadevicemanager.h M +110 -1 src/client/dataoffer.cpp M +45 -0 src/client/dataoffer.h M +74 -1 src/client/datasource.cpp M +57 -0 src/client/datasource.h M +1 -1 src/client/registry.cpp M +49 -2 src/server/datadevice_interface.cpp M +4 -3 src/server/datadevicemanager_interface.cpp M +15 -1 src/server/datadevicemanager_interface.h M +108 -22 src/server/dataoffer_interface.cpp M +27 -0 src/server/dataoffer_interface.h A +61 -0 src/server/dataoffer_interface_p.h [License: BSD] M +71 -1 src/server/datasource_interface.cpp M +29 -1 src/server/datasource_interface.h M +3 -0 src/server/seat_interface.cpp https://commits.kde.org/kwayland/a715a6cd1fe30acc5dde6d820136e67551fb36f6