Added SDL_WINDOWEVENT_TAKE_FOCUS.

This is for corner cases where a multi-window app is activated and wants to
make a decision about where focus should go.

This patch came from Unreal Engine 4's fork of SDL, compliments of Epic Games.
This commit is contained in:
Ryan C. Gordon 2016-01-05 02:27:50 -05:00
parent aa4952fdef
commit dc532c70e8
5 changed files with 19 additions and 7 deletions

View file

@ -161,7 +161,8 @@ typedef enum
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
SDL_WINDOWEVENT_HIT_TEST /** Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
} SDL_WindowEventID;
/**