diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2019-06-05 13:21:22 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2019-06-05 13:21:22 +0200 |
commit | 70d422afb8f631e14140f22b01256013b28b7034 (patch) | |
tree | 7e2e2155cb976122a6d586a9e6d00c3210ba1f0d /src/client/qwaylandwindow_p.h | |
parent | d829ba99c862efbdb6a040627176913a8a1e3847 (diff) | |
parent | cde2fe3fba31b9b8d258f0663bc34009fd769efd (diff) |
Merge remote-tracking branch 'qt/5.12' into texturesharing-5.12
Change-Id: Ib8fba00f848821bfab58d33aff74ace436af204a
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r-- | src/client/qwaylandwindow_p.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 56ebd3cc6..c47123dc9 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -120,7 +120,7 @@ public: void handleExpose(const QRegion ®ion); void commit(QWaylandBuffer *buffer, const QRegion &damage); - void waitForFrameSync(); + bool waitForFrameSync(int timeout); QMargins frameMargins() const override; @@ -191,7 +191,10 @@ public: bool startSystemMove(const QPoint &pos) override; + void timerEvent(QTimerEvent *event) override; void requestUpdate() override; + void handleUpdate(); + void deliverUpdateRequest() override; public slots: void applyConfigure(); @@ -211,10 +214,17 @@ protected: Qt::MouseButtons mMousePressedInContentArea = Qt::NoButton; WId mWindowId; - bool mWaitingForFrameSync = false; + bool mWaitingForFrameCallback = false; + bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out + int mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback struct ::wl_callback *mFrameCallback = nullptr; + struct ::wl_event_queue *mFrameQueue = nullptr; QWaitCondition mFrameSyncWait; + // True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer + bool mWaitingForUpdate = false; + int mFallbackUpdateTimerId = -1; // Started when waiting for app to commit + QMutex mResizeLock; bool mWaitingToApplyConfigure = false; bool mCanResize = true; @@ -253,11 +263,10 @@ private: void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e); void handleScreenChanged(); - bool mUpdateRequested = false; QRect mLastExposeGeometry; static const wl_callback_listener callbackListener; - static void frameCallback(void *data, struct wl_callback *wl_callback, uint32_t time); + void handleFrameCallback(); static QMutex mFrameSyncMutex; static QWaylandWindow *mMouseGrab; |