wayland: Don't print an error when moving a hidden popup window

Repositioning a hidden popup window is valid behavior, so don't print an error message in this case.
This commit is contained in:
Frank Praznik
2023-05-05 14:04:15 -04:00
parent 27085df50d
commit 1bf5a78b53

View File

@@ -2147,8 +2147,9 @@ int Wayland_SetWindowPosition(_THIS, SDL_Window *window)
SDL_WindowData *wind = window->driverdata;
/* Only popup windows can be positioned relative to the parent. */
if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP && wind->shell_surface.xdg.roleobj.popup.popup) {
if (xdg_popup_get_version(wind->shell_surface.xdg.roleobj.popup.popup) < XDG_POPUP_REPOSITION_SINCE_VERSION) {
if (wind->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP) {
if (wind->shell_surface.xdg.roleobj.popup.popup &&
xdg_popup_get_version(wind->shell_surface.xdg.roleobj.popup.popup) < XDG_POPUP_REPOSITION_SINCE_VERSION) {
return SDL_Unsupported();
}