QtWidgets: Suppress QEvent::WindowActivate when minimized
Prevent call to activateWindow() for minimized windows in QWidget::setWindowState() by clearing the flag. Fixes: QTBUG-46763 Change-Id: I40389d0906438ffe251fc79f18a523ecb53edb1b Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
ffac899576
commit
95ac2072bb
@ -2914,6 +2914,8 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
|
||||
{
|
||||
Q_D(QWidget);
|
||||
Qt::WindowStates oldstate = windowState();
|
||||
if (newstate.testFlag(Qt::WindowMinimized)) // QTBUG-46763
|
||||
newstate.setFlag(Qt::WindowActive, false);
|
||||
if (oldstate == newstate)
|
||||
return;
|
||||
if (isWindow() && !testAttribute(Qt::WA_WState_Created))
|
||||
|
Loading…
x
Reference in New Issue
Block a user