-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
window.UpdateSurface() errors out on wayland #506
Comments
Hi @yory8! I couldn't reproduce the issue using SDL2 2.0.20 and go-sdl2 v0.4.12 on my Fedora Linux, macOS Monterey (M1), and Windows 10. Could you help me reproduce it by specifying which platform you are running it on and how you got SDL2? Any extra information that could be related to this would also help. |
Thanks. I'm using it on Arch Linux, with the system's sdl2, using wayland (sway wm). Unfortunately I had paused working on my code for several months, so I'm unable to say when exactly it started breaking, and why (I managed to try sdl2 2.0.18 and it breaks too, but I cannot go any further because of incompatible dependencies) |
Ahh you're using Wayland. I'm not too familiar with it but perhaps setting the environment variable
If not, I will try to set up the same environment on one of my spare laptops or VMs to see if I can reproduce it. |
Doesn't work (was already using wayland), but it works if I do |
Hi, this is happening to me on X11, but it only happens when I run sdl.PollEvent(), does removing event polling fix the issue for you? |
I'm using sdl2 2.0.20 and go-sdl2 0.4.12.
I believe the bug was introduced by the new sdl2 version, as the code worked fine around 2.0.16 with go-sdl2 0.4.10 a few months ago.
The following minimal example breaks with error
Window surface is invalid, please call SDL_GetWindowSurface() to get a new surface
:(calling getsurface just before the window.updatesurface removes the warning but gives a black screen that panics soon after)
The text was updated successfully, but these errors were encountered: