mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Fixed the behaviour of love.window.requestAttention on Windows.
This commit is contained in:
@@ -974,6 +974,9 @@ void Window::requestAttention(bool continuous)
|
|||||||
{
|
{
|
||||||
#if defined(LOVE_WINDOWS)
|
#if defined(LOVE_WINDOWS)
|
||||||
|
|
||||||
|
if (hasFocus())
|
||||||
|
return;
|
||||||
|
|
||||||
SDL_SysWMinfo wminfo = {};
|
SDL_SysWMinfo wminfo = {};
|
||||||
SDL_VERSION(&wminfo.version);
|
SDL_VERSION(&wminfo.version);
|
||||||
|
|
||||||
@@ -986,7 +989,10 @@ void Window::requestAttention(bool continuous)
|
|||||||
flashinfo.dwFlags = FLASHW_ALL;
|
flashinfo.dwFlags = FLASHW_ALL;
|
||||||
|
|
||||||
if (continuous)
|
if (continuous)
|
||||||
|
{
|
||||||
|
flashinfo.uCount = 0;
|
||||||
flashinfo.dwFlags |= FLASHW_TIMERNOFG;
|
flashinfo.dwFlags |= FLASHW_TIMERNOFG;
|
||||||
|
}
|
||||||
|
|
||||||
FlashWindowEx(&flashinfo);
|
FlashWindowEx(&flashinfo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user