Windows: Use GetForegroundWindow() to check for active windows.
The previously used GetActiveWindow() returns the application's window also if it is minimized. Task-number: QTBUG-36806 Change-Id: I8ede3ea30e7b714aa1af85ed67e510e1692ebb8f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
8b54cfff82
commit
300be65b16
@ -1065,7 +1065,7 @@ bool QWindowsWindow::isVisible() const
|
||||
bool QWindowsWindow::isActive() const
|
||||
{
|
||||
// Check for native windows or children of the active native window.
|
||||
if (const HWND activeHwnd = GetActiveWindow())
|
||||
if (const HWND activeHwnd = GetForegroundWindow())
|
||||
if (m_data.hwnd == activeHwnd || IsChild(activeHwnd, m_data.hwnd))
|
||||
return true;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user