From 70c578cb5ec2964a75069ed6ca1353627e8cbe55 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Tue, 4 Feb 2014 11:28:31 +0200 Subject: [PATCH] Fix the client behavior when showing or hiding a surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reduce the chances of seeing a bad frame. Change-Id: Idac3450d92210fc5fc33cb68862b089964c9a8ce Reviewed-by: Jørgen Lind --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 67f122fb4a6..920c97780e7 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/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(0), 0, 0); + commit(); } - damage(QRect(QPoint(0,0),geometry().size())); - commit(); }