mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 17:35:34 +00:00
Added Ctrl-T to toggle topmost mode in test programs
This commit is contained in:
parent
4d9efcb55c
commit
b5e5c1ef48
|
@ -2019,6 +2019,20 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
|
|||
SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode() ? SDL_TRUE : SDL_FALSE);
|
||||
}
|
||||
break;
|
||||
case SDLK_t:
|
||||
if (withControl) {
|
||||
/* Ctrl-T toggle topmost mode */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
if (window) {
|
||||
Uint32 flags = SDL_GetWindowFlags(window);
|
||||
if (flags & SDL_WINDOW_ALWAYS_ON_TOP) {
|
||||
SDL_SetWindowAlwaysOnTop(window, SDL_FALSE);
|
||||
} else {
|
||||
SDL_SetWindowAlwaysOnTop(window, SDL_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_z:
|
||||
if (withControl) {
|
||||
/* Ctrl-Z minimize */
|
||||
|
|
Loading…
Reference in a new issue