Merge "Merge remote-tracking branch 'origin/5.12.5' into 5.12"
This commit is contained in:
commit
66e0c33ac3
@ -211,7 +211,10 @@ void QWaylandWindow::initWindow()
|
||||
void QWaylandWindow::initializeWlSurface()
|
||||
{
|
||||
Q_ASSERT(!isInitialized());
|
||||
init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this)));
|
||||
{
|
||||
QWriteLocker lock(&mSurfaceLock);
|
||||
init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this)));
|
||||
}
|
||||
emit wlSurfaceCreated();
|
||||
}
|
||||
|
||||
@ -249,6 +252,7 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
|
||||
mSubSurfaceWindow = nullptr;
|
||||
if (isInitialized()) {
|
||||
emit wlSurfaceDestroyed();
|
||||
QWriteLocker lock(&mSurfaceLock);
|
||||
destroy();
|
||||
}
|
||||
mScreens.clear();
|
||||
@ -1152,6 +1156,9 @@ void QWaylandWindow::requestUpdate()
|
||||
void QWaylandWindow::handleUpdate()
|
||||
{
|
||||
// TODO: Should sync subsurfaces avoid requesting frame callbacks?
|
||||
QReadLocker lock(&mSurfaceLock);
|
||||
if (!isInitialized())
|
||||
return;
|
||||
|
||||
if (mFrameCallback) {
|
||||
wl_callback_destroy(mFrameCallback);
|
||||
|
@ -53,6 +53,8 @@
|
||||
|
||||
#include <QtCore/QWaitCondition>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QReadWriteLock>
|
||||
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
@ -276,6 +278,8 @@ private:
|
||||
static QMutex mFrameSyncMutex;
|
||||
static QWaylandWindow *mMouseGrab;
|
||||
|
||||
QReadWriteLock mSurfaceLock;
|
||||
|
||||
friend class QWaylandSubSurface;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user