mirror of
https://github.com/encounter/SDL.git
synced 2025-12-13 15:16:13 +00:00
Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows
This commit is contained in:
@@ -1064,17 +1064,20 @@ WIN_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
|
||||
}
|
||||
|
||||
int
|
||||
WIN_FlashWindow(_THIS, SDL_Window * window, Uint32 flash_count)
|
||||
WIN_FlashWindow(_THIS, SDL_Window * window)
|
||||
{
|
||||
HWND hwnd;
|
||||
FLASHWINFO desc;
|
||||
const char *hint = SDL_GetHint(SDL_HINT_WINDOW_FLASH_COUNT);
|
||||
|
||||
hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
SDL_zero(desc);
|
||||
desc.cbSize = sizeof(desc);
|
||||
desc.hwnd = hwnd;
|
||||
desc.hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
desc.dwFlags = FLASHW_TRAY;
|
||||
desc.uCount = flash_count; /* flash x times */
|
||||
desc.dwTimeout = 0;
|
||||
if (hint && *hint) {
|
||||
desc.uCount = SDL_atoi(hint);
|
||||
} else {
|
||||
desc.dwFlags |= FLASHW_TIMERNOFG;
|
||||
}
|
||||
|
||||
FlashWindowEx(&desc);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ extern void WIN_OnWindowEnter(_THIS, SDL_Window * window);
|
||||
extern void WIN_UpdateClipCursor(SDL_Window *window);
|
||||
extern int WIN_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);
|
||||
extern void WIN_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept);
|
||||
extern int WIN_FlashWindow(_THIS, SDL_Window * window, Uint32 flash_count);
|
||||
extern int WIN_FlashWindow(_THIS, SDL_Window * window);
|
||||
|
||||
#endif /* SDL_windowswindow_h_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user