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>
This commit is contained in:
Giulio Camuffo 2014-02-04 11:28:31 +02:00 committed by The Qt Project
parent 43aaab2808
commit 70c578cb5e

View File

@ -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();
}