diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-10-21 14:44:08 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-10-22 06:22:36 +0200 |
commit | 7614d734c46feb6f74aa0651ae18f850a324e381 (patch) | |
tree | e64b29949cfb5e456df6d416f6a2fd48223e26ae /src/plugins | |
parent | ab556d6b321bb02cec2a0c0705b1212377fde095 (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index dd9b9de0b6..8a80729354 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -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) |