SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_SyncWindow

Block until any pending window state is finalized.

Header File

Defined in <SDL3/SDL_video.h>

Syntax

bool SDL_SyncWindow(SDL_Window *window);

Function Parameters

SDL_Window * window the window for which to wait for the pending state to be applied.

Return Value

(bool) Returns true on success or false if the operation timed out before the window was in the requested state.

Remarks

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.

Version

This function is available since SDL 3.1.3.

See Also


CategoryAPI, CategoryAPIFunction, CategoryVideo


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.