From 5cf53f581b8b383fe7b1bf9bb9e28c72394e2e16 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Mon, 9 Mar 2026 12:10:59 +0100 Subject: layout/windowTarget: add visualBox (#13626) Allows layouts to explicitly define the visual geometry of a tiled window. --- src/layout/target/Target.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/layout/target/Target.cpp') 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& space, std::optional 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) { -- cgit v1.2.3