Client: Reset frame callback timer when hiding a window
If we hide a window whilst a compositor has a pending frame to show, it's possible the compositor will not render the frame and not return the callback. If this happens on the next window expose we can be left with mFrameCallbackTimedOut still true causing isExposed() to remain false and us to not send the next buffer when we later show the window again. Change-Id: I507410415d1a930fd5fa736412055e68fdf6c1d3 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
26c5d5e62b
commit
32b338a8dc
@ -254,6 +254,13 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
|
|||||||
mFrameCallback = nullptr;
|
mFrameCallback = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int timerId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1);
|
||||||
|
if (timerId != -1) {
|
||||||
|
killTimer(timerId);
|
||||||
|
}
|
||||||
|
mWaitingForFrameCallback = false;
|
||||||
|
mFrameCallbackTimedOut = false;
|
||||||
|
|
||||||
mMask = QRegion();
|
mMask = QRegion();
|
||||||
mQueuedBuffer = nullptr;
|
mQueuedBuffer = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user