Windows: Implement Qt::WA_ShowWithoutActivating.
Set dynamic property for all platforms and query it in QWindowsWindow::show_sys(). Task-number: QTBUG-19194 Task-number: QTBUG-34504 Change-Id: I4199a2ed835d3de928405d470a81c54da93cc768 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>bb10
parent
ab556d6b32
commit
7614d734c4
|
|
@ -1149,6 +1149,13 @@ void QWindowsWindow::updateTransientParent() const
|
|||
#endif // !Q_OS_WINCE
|
||||
}
|
||||
|
||||
static inline bool testShowWithoutActivating(const QWindow *window)
|
||||
{
|
||||
// QWidget-attribute Qt::WA_ShowWithoutActivating .
|
||||
const QVariant showWithoutActivating = window->property("_q_showWithoutActivating");
|
||||
return showWithoutActivating.isValid() && showWithoutActivating.toBool();
|
||||
}
|
||||
|
||||
// partially from QWidgetPrivate::show_sys()
|
||||
void QWindowsWindow::show_sys() const
|
||||
{
|
||||
|
|
@ -1180,7 +1187,7 @@ void QWindowsWindow::show_sys() const
|
|||
} // Qt::WindowMaximized
|
||||
} // !Qt::WindowMinimized
|
||||
}
|
||||
if (type == Qt::Popup || type == Qt::ToolTip || type == Qt::Tool)
|
||||
if (type == Qt::Popup || type == Qt::ToolTip || type == Qt::Tool || testShowWithoutActivating(w))
|
||||
sm = SW_SHOWNOACTIVATE;
|
||||
|
||||
if (w->windowState() & Qt::WindowMaximized)
|
||||
|
|
|
|||
|
|
@ -1403,10 +1403,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
|||
win->setProperty(propertyName, q->property(propertyName));
|
||||
}
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
if (q->testAttribute(Qt::WA_ShowWithoutActivating))
|
||||
win->setProperty("_q_showWithoutActivating", QVariant(true));
|
||||
#endif
|
||||
win->setFlags(data.window_flags);
|
||||
fixPosIncludesFrame();
|
||||
if (q->testAttribute(Qt::WA_Moved)
|
||||
|
|
|
|||
Loading…
Reference in New Issue