diff options
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r-- | src/client/qwaylandwindow_p.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 3e9b4385..5eadc02c 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -121,11 +121,11 @@ public: void commit(); - void waitForFrameSync(); + bool waitForFrameSync(int timeout); QMargins frameMargins() const override; QSize surfaceSize() const; - QRect windowGeometry() const; + QRect windowContentGeometry() const; QWaylandSurface *waylandSurface() const { return mSurface.data(); } ::wl_surface *wlSurface(); @@ -194,7 +194,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(); @@ -214,10 +217,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; @@ -254,11 +264,10 @@ private: void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e); void handleScreensChanged(); - 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; |