Remove SDL_SetWindowInputFocus

This was added to SDL2 for the Unreal Engine's implementation of menus and dialogs on X11, window types for which SDL3 has added built-in, cross-platform support.

Remove this function, as it was only ever implemented for X11 and is now basically useless aside from allowing annoying or malicious client apps to discretely steal focus. As the documentation states: "You almost certainly want SDL_RaiseWindow() instead of this function."
This commit is contained in:
Frank Praznik 2024-07-03 11:15:30 -04:00
parent 0f8054cf87
commit be13328cb1
10 changed files with 1 additions and 47 deletions

View file

@ -2177,23 +2177,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window *window, float *
*/
extern SDL_DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window);
/**
* Explicitly set input focus to the window.
*
* 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.
*
* \param window the window that should get the input focus.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_RaiseWindow
*/
extern SDL_DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window *window);
/**
* Set whether the window may have input focus.
*