diff --git a/autotests/mockclient.h b/autotests/mockclient.h --- a/autotests/mockclient.h +++ b/autotests/mockclient.h @@ -67,6 +67,7 @@ void requestToggleShade() override; void requestShowToolTip(const QString &text) override; void requestHideToolTip() override; + QSize size() const override; int width() const override; WId windowId() const override; diff --git a/autotests/mockclient.cpp b/autotests/mockclient.cpp --- a/autotests/mockclient.cpp +++ b/autotests/mockclient.cpp @@ -242,6 +242,11 @@ } +QSize MockClient::size() const +{ + return QSize(m_width, m_height); +} + int MockClient::width() const { return m_width; diff --git a/src/decoratedclient.h b/src/decoratedclient.h --- a/src/decoratedclient.h +++ b/src/decoratedclient.h @@ -157,6 +157,10 @@ * The height of the DecoratedClient. **/ Q_PROPERTY(int height READ height NOTIFY heightChanged) + /** + * The size of the DecoratedClient. + **/ + Q_PROPERTY(QSize size READ size NOTIFY sizeChanged) /** * The palette this DecoratedClient uses. The palette might be different for each * DecoratedClient and the Decoration should honor the palette. @@ -212,6 +216,7 @@ int width() const; int height() const; + QSize size() const; QPointer decoration() const; QPalette palette() const; @@ -273,6 +278,7 @@ void widthChanged(int); void heightChanged(int); + void sizeChanged(const QSize &size); void paletteChanged(const QPalette &palette); void adjacentScreenEdgesChanged(Qt::Edges edges); diff --git a/src/decoratedclient.cpp b/src/decoratedclient.cpp --- a/src/decoratedclient.cpp +++ b/src/decoratedclient.cpp @@ -64,6 +64,7 @@ DELEGATE(WId, decorationId) DELEGATE(int, width) DELEGATE(int, height) +DELEGATE(QSize, size) DELEGATE(QPalette, palette) DELEGATE(Qt::Edges, adjacentScreenEdges) diff --git a/src/private/CMakeLists.txt b/src/private/CMakeLists.txt --- a/src/private/CMakeLists.txt +++ b/src/private/CMakeLists.txt @@ -25,7 +25,7 @@ target_include_directories(kdecorations2private INTERFACE "$" ) set_target_properties(kdecorations2private PROPERTIES VERSION ${KDECORATION2_VERSION_STRING} - SOVERSION 6 + SOVERSION 7 EXPORT_NAME KDecoration2Private ) diff --git a/src/private/decoratedclientprivate.h b/src/private/decoratedclientprivate.h --- a/src/private/decoratedclientprivate.h +++ b/src/private/decoratedclientprivate.h @@ -73,6 +73,7 @@ virtual int width() const = 0; virtual int height() const = 0; + virtual QSize size() const = 0; virtual QPalette palette() const = 0; virtual Qt::Edges adjacentScreenEdges() const = 0;