diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-11-21 14:43:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-21 16:28:36 +0100 |
commit | 773610cc451bb2b4319da6567b21510022d08014 (patch) | |
tree | 5f0120e5f1ead773011dcf851f8756bbab9a54b7 /src/widgets | |
parent | 8259e45c1e87c66ac8c39f1ebaccd7d753fb55fb (diff) |
Revert "Ensure Qt::WA_Mapped is set in case of obscured native windows."
Qt::WA_Mapped maps (sic) to windowHandle()->isExposed(), and we set/update
it in QWidgetWindow::handleExposeEvent(). Setting it directly in show_sys
shortcuts QPA and assumes showing a window is synchronous on all platforms,
resulting in trying to flush the widget backingstore when the window was
not exposed yet (due to discardSyncRequest starting to return false).
This reverts commit 829b1d13b225e87b8a385397e2b53c7a9f8cda9e.
Change-Id: I0bd700d4939bc69ba184d8586435b68ec3dd72fb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget_qpa.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 3c4985591e..93234f3958 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -510,9 +510,9 @@ void QWidgetPrivate::show_sys() QWindow *window = q->windowHandle(); - q->setAttribute(Qt::WA_Mapped); if (q->testAttribute(Qt::WA_DontShowOnScreen)) { invalidateBuffer(q->rect()); + q->setAttribute(Qt::WA_Mapped); if (q->isWindow() && q->windowModality() != Qt::NonModal && window) { // add our window to the modal window list QGuiApplicationPrivate::showModalWindow(window); diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 22e15e23fe..e977ab3d6f 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -713,10 +713,6 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event break; } - // Note that widgetState == m_widget->data->window_state when triggered by QWidget::setWindowState(). - if (!(widgetState & Qt::WindowMinimized)) - m_widget->setAttribute(Qt::WA_Mapped); - // Sent event if the state changed (that is, it is not triggered by // QWidget::setWindowState(), which also sends an event to the widget). if (widgetState != int(m_widget->data->window_state)) { |