summaryrefslogtreecommitdiff
path: root/src/layout/target/Target.cpp
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2026-03-09 12:10:59 +0100
committerGitHub <noreply@github.com>2026-03-09 11:10:59 +0000
commit5cf53f581b8b383fe7b1bf9bb9e28c72394e2e16 (patch)
tree497bb4e7aecb82f27028ad00e81fd79606368f6c /src/layout/target/Target.cpp
parent03f444e0ab1cabe79cf05f2291b168d9c7a7ab49 (diff)
layout/windowTarget: add visualBox (#13626)
Allows layouts to explicitly define the visual geometry of a tiled window.
Diffstat (limited to 'src/layout/target/Target.cpp')
-rw-r--r--src/layout/target/Target.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/layout/target/Target.cpp b/src/layout/target/Target.cpp
index e433c237..e8ce48bd 100644
--- a/src/layout/target/Target.cpp
+++ b/src/layout/target/Target.cpp
@@ -7,9 +7,14 @@
using namespace Layout;
using namespace Hyprutils::Utils;
-void ITarget::setPositionGlobal(const CBox& box) {
+void ITarget::setPositionGlobal(const STargetBox& box) {
m_box = box;
- m_box.round();
+ m_box.logicalBox.round();
+ m_box.visualBox.round();
+}
+
+void ITarget::setPositionGlobal(const CBox& box) {
+ setPositionGlobal({.logicalBox = box});
}
void ITarget::assignToSpace(const SP<CSpace>& space, std::optional<Vector2D> focalPoint) {
@@ -57,7 +62,7 @@ PHLWORKSPACE ITarget::workspace() const {
}
CBox ITarget::position() const {
- return m_box;
+ return m_box.logicalBox;
}
void ITarget::rememberFloatingSize(const Vector2D& size) {