.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_SetWindowSize: .\" https://wiki.libsdl.org/SDL_SetWindowSize .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-3.1.0 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_SetWindowSize .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_SetWindowSize 3 "SDL 3.1.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_SetWindowSize \- Request that the size of a window's client area be set\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "int SDL_SetWindowSize(SDL_Window *window, int w, int h); .fi .SH DESCRIPTION NULL can safely be passed as the .BR w or .BR h parameter if the width or height value is not desired\[char46] If, at the time of this request, the window in a fixed-size state, such as maximized or fullscreen, the request will be deferred until the window exits this state and becomes resizable again\[char46] To change the fullscreen mode of a window, use .BR SDL_SetWindowFullscreenMode () On some windowing systems, this request is asynchronous and the new window size may not have have been applied immediately upon the return of this function\[char46] If an immediate change is required, call .BR SDL_SyncWindow () to block until the changes have taken effect\[char46] When the window size changes, an .BR SDL_EVENT_WINDOW_RESIZED event will be emitted with the new window dimensions\[char46] Note that the new dimensions may not match the exact size requested, as some windowing systems can restrict the window size in certain scenarios (e\[char46]g\[char46] constraining the size of the content area to remain within the usable desktop bounds)\[char46] Additionally, as this is just a request, it can be denied by the windowing system\[char46] .SH FUNCTION PARAMETERS .TP .I window the window to change .TP .I w the width of the window, must be > 0 .TP .I h the height of the window, must be > 0 .SH RETURN VALUE Returns 0 on success or a negative error code on failure; call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_GetWindowSize (3), .BR SDL_SetWindowFullscreenMode (3), .BR SDL_SyncWindow (3)