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.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/layout/target/Target.hpp') diff --git a/src/layout/target/Target.hpp b/src/layout/target/Target.hpp index dcaefdb4..bae5eee5 100644 --- a/src/layout/target/Target.hpp +++ b/src/layout/target/Target.hpp @@ -25,6 +25,11 @@ namespace Layout { std::optional pos; }; + struct STargetBox { + CBox logicalBox; + CBox visualBox; + }; + class ITarget { public: virtual ~ITarget() = default; @@ -32,7 +37,8 @@ namespace Layout { virtual eTargetType type() = 0; // position is within its space - virtual void setPositionGlobal(const CBox& box); + virtual void setPositionGlobal(const STargetBox& box); + void setPositionGlobal(const CBox& box); virtual CBox position() const; virtual void assignToSpace(const SP& space, std::optional focalPoint = std::nullopt); virtual void setSpaceGhost(const SP& space); @@ -67,7 +73,7 @@ namespace Layout { protected: ITarget() = default; - CBox m_box; + STargetBox m_box; SP m_space; WP m_self; Vector2D m_floatingSize; @@ -76,4 +82,4 @@ namespace Layout { Vector2D m_pseudoSize = {1280, 720}; bool m_wasTiling = false; }; -}; \ No newline at end of file +}; -- cgit v1.2.3