1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

WindowUtils: Make areThereAnyAlwaysOnTopWindows() public

This commit is contained in:
reuk 2023-05-03 13:19:35 +01:00
parent ad59f71b99
commit 53bfd5b16d
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
22 changed files with 257 additions and 69 deletions

View file

@ -4775,37 +4775,6 @@ bool JUCE_CALLTYPE Process::isForegroundProcess()
void JUCE_CALLTYPE Process::makeForegroundProcess() {}
void JUCE_CALLTYPE Process::hide() {}
//==============================================================================
static BOOL CALLBACK enumAlwaysOnTopWindows (HWND hwnd, LPARAM lParam)
{
if (IsWindowVisible (hwnd))
{
DWORD processID = 0;
GetWindowThreadProcessId (hwnd, &processID);
if (processID == GetCurrentProcessId())
{
WINDOWINFO info{};
if (GetWindowInfo (hwnd, &info)
&& (info.dwExStyle & WS_EX_TOPMOST) != 0)
{
*reinterpret_cast<bool*> (lParam) = true;
return FALSE;
}
}
}
return TRUE;
}
bool detail::WindowingHelpers::areThereAnyAlwaysOnTopWindows()
{
bool anyAlwaysOnTopFound = false;
EnumWindows (&enumAlwaysOnTopWindows, (LPARAM) &anyAlwaysOnTopFound);
return anyAlwaysOnTopFound;
}
//==============================================================================
bool detail::MouseInputSourceList::addSource()
{