diff options
author | Ilya Fedin <fedin-ilja2010@ya.ru> | 2022-04-12 08:48:34 +0400 |
---|---|---|
committer | Ilya Fedin <fedin-ilja2010@ya.ru> | 2022-07-19 19:15:01 +0400 |
commit | c9f355ebe8d8171c2de265c00780d7f39b580409 (patch) | |
tree | 65f30943b16f176154561d5457d8388b7e271398 /src/client/qwaylandwindow_p.h | |
parent | 5a288c87e00cdd7224a673eb7ae35b0995d881ba (diff) | |
download | qtwayland-c9f355ebe8d8171c2de265c00780d7f39b580409.tar.gz |
Client: Expose a way to set window margins via native interface
The lack of such API is a big hassle to me since a long time.
All that time I was forced to have my own fork of the
xdg-shell plugin in the application code in order to have
shadows on Wayland with custom client-side decorations.
I hope I won't have to maintain the fork anymore.
Pick-to: 6.4
Change-Id: Iaf498469843b5cac5c458049164065c4ef15877d
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r-- | src/client/qwaylandwindow_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 66d5bdad..d2d4d659 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -112,6 +112,7 @@ public: bool waitForFrameSync(int timeout); QMargins frameMargins() const override; + void setCustomMargins(const QMargins &margins); QSize surfaceSize() const; QRect windowContentGeometry() const; QPointF mapFromWlSurface(const QPointF &surfacePosition) const; @@ -289,6 +290,8 @@ protected: QWaylandBuffer *mQueuedBuffer = nullptr; QRegion mQueuedBufferDamage; + QMargins mCustomMargins; + private: void setGeometry_helper(const QRect &rect); void initWindow(); |