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:
parent
43aaab2808
commit
70c578cb5e
@ -207,9 +207,6 @@ void QWaylandWindow::setGeometry(const QRect &rect)
|
|||||||
void QWaylandWindow::setVisible(bool visible)
|
void QWaylandWindow::setVisible(bool visible)
|
||||||
{
|
{
|
||||||
if (visible) {
|
if (visible) {
|
||||||
if (mBuffer)
|
|
||||||
attach(mBuffer->buffer(), 0, 0);
|
|
||||||
|
|
||||||
if (window()->type() == Qt::Popup && transientParent()) {
|
if (window()->type() == Qt::Popup && transientParent()) {
|
||||||
QWaylandWindow *parent = transientParent();
|
QWaylandWindow *parent = transientParent();
|
||||||
mMouseDevice = parent->mMouseDevice;
|
mMouseDevice = parent->mMouseDevice;
|
||||||
@ -230,10 +227,10 @@ void QWaylandWindow::setVisible(bool visible)
|
|||||||
// QWaylandShmBackingStore::beginPaint().
|
// QWaylandShmBackingStore::beginPaint().
|
||||||
} else {
|
} else {
|
||||||
QWindowSystemInterface::handleExposeEvent(window(), QRegion());
|
QWindowSystemInterface::handleExposeEvent(window(), QRegion());
|
||||||
|
QWindowSystemInterface::flushWindowSystemEvents();
|
||||||
attach(static_cast<QWaylandBuffer *>(0), 0, 0);
|
attach(static_cast<QWaylandBuffer *>(0), 0, 0);
|
||||||
|
commit();
|
||||||
}
|
}
|
||||||
damage(QRect(QPoint(0,0),geometry().size()));
|
|
||||||
commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user