Commit 28b3b8f0 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[libkwineffects] Expose frame and buffer geometry to effects

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T10867

Differential Revision: https://phabricator.kde.org/D24459
parent 79f4168f
......@@ -107,6 +107,12 @@ public:
QRect expandedGeometry() const override {
return QRect();
}
QRect frameGeometry() const override {
return QRect();
}
QRect bufferGeometry() const override {
return QRect();
}
int screen() const override {
return 0;
}
......
......@@ -1828,6 +1828,8 @@ TOPLEVEL_HELPER(QPoint, pos, pos)
TOPLEVEL_HELPER(QSize, size, size)
TOPLEVEL_HELPER(int, screen, screen)
TOPLEVEL_HELPER(QRect, geometry, frameGeometry)
TOPLEVEL_HELPER(QRect, frameGeometry, frameGeometry)
TOPLEVEL_HELPER(QRect, bufferGeometry, bufferGeometry)
TOPLEVEL_HELPER(QRect, expandedGeometry, visibleRect)
TOPLEVEL_HELPER(QRect, rect, rect)
TOPLEVEL_HELPER(int, desktop, desktop)
......
......@@ -406,6 +406,8 @@ public:
QSize basicUnit() const override;
QRect geometry() const override;
QRect frameGeometry() const override;
QRect bufferGeometry() const override;
QString caption() const override;
......
......@@ -2192,7 +2192,28 @@ public:
* MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all.
*/
virtual QSize basicUnit() const = 0;
/**
* @deprecated Use frameGeometry() instead.
*/
virtual QRect geometry() const = 0;
/**
* Returns the geometry of the window excluding server-side and client-side
* drop-shadows.
*
* @since 5.18
*/
virtual QRect frameGeometry() const = 0;
/**
* Returns the geometry of the pixmap or buffer attached to this window.
*
* For X11 clients, this method returns server-side geometry of the Toplevel.
*
* For Wayland clients, this method returns rectangle that the main surface
* occupies on the screen, in global screen coordinates.
*
* @since 5.18
*/
virtual QRect bufferGeometry() const = 0;
/**
* Geometry of the window including decoration and potentially shadows.
* May be different from geometry() if the window has a shadow.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment