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()
|
void QWaylandWindow::initializeWlSurface()
|
||||||
{
|
{
|
||||||
Q_ASSERT(!isInitialized());
|
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();
|
emit wlSurfaceCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,6 +252,7 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
|
|||||||
mSubSurfaceWindow = nullptr;
|
mSubSurfaceWindow = nullptr;
|
||||||
if (isInitialized()) {
|
if (isInitialized()) {
|
||||||
emit wlSurfaceDestroyed();
|
emit wlSurfaceDestroyed();
|
||||||
|
QWriteLocker lock(&mSurfaceLock);
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
mScreens.clear();
|
mScreens.clear();
|
||||||
@ -1152,6 +1156,9 @@ void QWaylandWindow::requestUpdate()
|
|||||||
void QWaylandWindow::handleUpdate()
|
void QWaylandWindow::handleUpdate()
|
||||||
{
|
{
|
||||||
// TODO: Should sync subsurfaces avoid requesting frame callbacks?
|
// TODO: Should sync subsurfaces avoid requesting frame callbacks?
|
||||||
|
QReadLocker lock(&mSurfaceLock);
|
||||||
|
if (!isInitialized())
|
||||||
|
return;
|
||||||
|
|
||||||
if (mFrameCallback) {
|
if (mFrameCallback) {
|
||||||
wl_callback_destroy(mFrameCallback);
|
wl_callback_destroy(mFrameCallback);
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
#include <QtCore/QWaitCondition>
|
#include <QtCore/QWaitCondition>
|
||||||
#include <QtCore/QMutex>
|
#include <QtCore/QMutex>
|
||||||
|
#include <QtCore/QReadWriteLock>
|
||||||
|
|
||||||
#include <QtGui/QIcon>
|
#include <QtGui/QIcon>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
#include <QtCore/QLoggingCategory>
|
#include <QtCore/QLoggingCategory>
|
||||||
@ -276,6 +278,8 @@ private:
|
|||||||
static QMutex mFrameSyncMutex;
|
static QMutex mFrameSyncMutex;
|
||||||
static QWaylandWindow *mMouseGrab;
|
static QWaylandWindow *mMouseGrab;
|
||||||
|
|
||||||
|
QReadWriteLock mSurfaceLock;
|
||||||
|
|
||||||
friend class QWaylandSubSurface;
|
friend class QWaylandSubSurface;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user