mirror of https://github.com/encounter/SDL.git
video: wayland: Handle 0x0 xdg_toplevel_configure in fullscreen
The xdg_shell spec seems to state[1] that xdg_toplevel_configure events can always provide a 0×0 width/height to signal that the compositor doesn't care. SDL previously assumed the provided width/height was always valid for fullscreen windows, and so applied it as-is. This broke SDL applications on KDE/KWin 5.23, which now sends 0×0 configure events (and, in 5.23.3, 1×1 events for some reason), breaking all SDL applications in fullscreen[2]. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/6 [2]: https://bugs.kde.org/show_bug.cgi?id=444962#c6
This commit is contained in:
parent
2f0edc2906
commit
a709b5b602
|
@ -290,8 +290,10 @@ handle_configure_xdg_toplevel(void *data,
|
||||||
/* For fullscreen, foolishly do what the compositor says. If it's wrong,
|
/* For fullscreen, foolishly do what the compositor says. If it's wrong,
|
||||||
* don't blame us, we were explicitly instructed to do this.
|
* don't blame us, we were explicitly instructed to do this.
|
||||||
*/
|
*/
|
||||||
window->w = width;
|
if (width != 0 && height != 0) {
|
||||||
window->h = height;
|
window->w = width;
|
||||||
|
window->h = height;
|
||||||
|
}
|
||||||
|
|
||||||
/* This part is good though. */
|
/* This part is good though. */
|
||||||
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
|
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
|
||||||
|
|
Loading…
Reference in New Issue