summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-02-04 11:28:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-04 11:41:30 +0100
commit50f43a0c56e4329facbba6b7e4bbec0e87ff9d63 (patch)
tree076bb33a622daf0bedf4e3a838ec30660725784c /src/client
parentb073adbf8387e0082bf830234740a93ef978ad83 (diff)
downloadqtwayland-50f43a0c56e4329facbba6b7e4bbec0e87ff9d63.tar.gz
Fix the client behavior when showing or hiding a surface
Reduce the chances of seeing a bad frame. Change-Id: Idac3450d92210fc5fc33cb68862b089964c9a8ce Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylandwindow.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 67f122fb..920c9778 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -207,9 +207,6 @@ void QWaylandWindow::setGeometry(const QRect &rect)
void QWaylandWindow::setVisible(bool visible)
{
if (visible) {
- if (mBuffer)
- attach(mBuffer->buffer(), 0, 0);
-
if (window()->type() == Qt::Popup && transientParent()) {
QWaylandWindow *parent = transientParent();
mMouseDevice = parent->mMouseDevice;
@@ -230,10 +227,10 @@ void QWaylandWindow::setVisible(bool visible)
// QWaylandShmBackingStore::beginPaint().
} else {
QWindowSystemInterface::handleExposeEvent(window(), QRegion());
+ QWindowSystemInterface::flushWindowSystemEvents();
attach(static_cast<QWaylandBuffer *>(0), 0, 0);
+ commit();
}
- damage(QRect(QPoint(0,0),geometry().size()));
- commit();
}