Scroll to navigation

SDL_SetWindowInputFocus(3) SDL3 FUNCTIONS SDL_SetWindowInputFocus(3)

NAME

SDL_SetWindowInputFocus - Explicitly set input focus to the window.

SYNOPSIS

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

DESCRIPTION

You almost certainly want SDL_RaiseWindow () instead of this function. Use this with caution, as you might give focus to a window that is completely obscured by other windows.

FUNCTION PARAMETERS

the window that should get the input focus

RETURN VALUE

Returns 0 on success 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_RaiseWindow(3)

SDL 3.1.0 SDL