logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_SyncWindow - Block until any pending window state is finalized.

Availability

       This function is available since SDL 3.2.0.

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.

Header File

       Defined in SDL3/SDL_video.h

Name

       SDL_SyncWindow - Block until any pending window state is finalized.

Return Value

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

See Also

(3),  SDL_SetWindowSize(3),  (3),  SDL_SetWindowPosition(3),  (3),  SDL_SetWindowFullscreen(3),  (3),
       SDL_MinimizeWindow(3),     (3),     SDL_MaximizeWindow(3),     (3),     SDL_RestoreWindow(3),     (3),
       SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS(3)

Simple Directmedia Layer                           SDL 3.2.10                                  SDL_SyncWindow(3)

Synopsis

#include"SDL3/SDL.h"boolSDL_SyncWindow(SDL_Window*window);

Thread Safety

       This function should only be called on the main thread.

See Also