Right now, launching osu-lazer on a wayland session will fallback to using xwayland (and create a X surface).
Having osu support wayland natively would be awesome.
https://github.com/ppy/osuTK is probably the correct place for this issues as we use that fork of openTK to create windows. That said, I'm unsure if it's even possible because we use SDL on linux (see this).
@jorolf I'd love to create a new issue on said repo but it's got issues disabled
I believe SDL2 already has wayland support so I think it would be possible. You could also try running lazer with the environment variable SDL_VIDEODRIVER=wayland set to see if the currently linked version of the library will use wayland now.
@jai-x

Sadly, it will not.
I'm running arch so my libraries should be up-to-date.
馃 I don't think that's how you export enviroment variables
https://wiki.archlinux.org/index.php/Environment_variables
I don't think that's how you export enviroment variables
https://wiki.archlinux.org/index.php/Environment_variables
Oops. Using export SDL_VIDEODRIVER=wayland, osu-lazer does run natively!
Brilliant, now we just have to make this a default (if on wayland, of course).
Feel free to create a pull request to osuTK so that SDL does this automatically on startup
I can confirm setting SDL_VIDEODRIVER=wayland successfully causes the client to start up in wayland mode. But I also encounter some bugs.
"If closed, it leaves a black unmovable box on the screen if it was in full screen mode. This may be a Gnome Mutter bug, but no other program causes something like this."
This is fixed now
Scrolling is over sensitive. Scrolling in the settings is nearly impossible. Scrolling for volume seems to treat every scroll wheel step as 50%. So i can step between 0%, 50% and 100%
Fixed
It does not start on the primary screen.
Fixed
It is now playable. Missing window decoration in windows mode is still a big issue for those playing in windowed mode and the colour issue is still a bit annoying.
@Alexmitter have you attempted running using --sdl? This uses our newer backend which may give you better window manager support.
Hello @peppy . I did dig a bit into the decoration issue and it seems like something not fixable. Wayland wants clients to draw their own decorations while traditionally the server side did this job. But SDL does not want to support drawing its own decoration.
Something like libdecoration may be the solution but I do not think its ready yet.
--sdl works but I noticed that the sdl2 library is not included in the appimage while all games usually do this. Think about including it.
One thing that is still pretty annoying is the color border issue exclusive to wayland.
With Xorg

With Wayland

Thank you for your help ppy
I think it's safe to close this issue for now then.
Most helpful comment
I think it's safe to close this issue for now then.