sdlSyncWindow function
Block until any pending window state is finalized.
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.
\param window the window for which to wait for the pending state to be applied. \returns true on success or false if the operation timed out before the window was in the requested state.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_SetWindowSize \sa SDL_SetWindowPosition \sa SDL_SetWindowFullscreen \sa SDL_MinimizeWindow \sa SDL_MaximizeWindow \sa SDL_RestoreWindow \sa SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS
extern SDL_DECLSPEC bool SDLCALL SDL_SyncWindow(SDL_Window *window)
Implementation
bool sdlSyncWindow(Pointer<SdlWindow> window) {
final sdlSyncWindowLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlWindow> window),
int Function(Pointer<SdlWindow> window)>('SDL_SyncWindow');
return sdlSyncWindowLookupFunction(window) == 1;
}