SDL_SyncWindow(3)

NAME
SDL_SyncWindow - Block until any pending window state is finalized.

HEADER FILE
Defined in SDL3/SDL_video.h

SYNOPSIS
#include "SDL3/SDL.h"

int SDL_SyncWindow(SDL_Window *window);

DESCRIPTION
On asynchronous windowing systems, this acts as a synchronization barrier for pending window state. It will attempt to wait until any pending window state has been applied and is guaranteed to return within finite time. Note that for how long it can potentially block depends on the underlying window system, as window state changes may involve somewhat lengthy animations that must complete before the window is in its final requested state. On windowing systems where changes are immediate, this does nothing.

FUNCTION PARAMETERS

window
    the window for which to wait for the pending state to be applied

RETURN VALUE
Returns 0 on success, a positive value if the operation timed out before the window was in the requested state, or a negative error code on failure; call SDL_GetError () for more information.

AVAILABILITY
This function is available since SDL 3.0.0.

SEE ALSO
SDL_SetWindowSize(3), SDL_SetWindowPosition(3), SDL_SetWindowFullscreen(3), SDL_MinimizeWindow(3), SDL_MaximizeWindow(3), SDL_RestoreWindow(3)