From 98fbbafef78057c818fb02b15c27e38ad2f5b5bc Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Tue, 28 Apr 2026 15:56:07 +0100 Subject: config/errors: Report and categorize errors properly for actions (#14192) Makes all errors categorized, some not displayed, some displayed. All errors can be obtained after hl.dispatch() --- src/layout/algorithm/Algorithm.hpp | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/layout/algorithm/Algorithm.hpp') diff --git a/src/layout/algorithm/Algorithm.hpp b/src/layout/algorithm/Algorithm.hpp index 7df6c5c1..8b9e471d 100644 --- a/src/layout/algorithm/Algorithm.hpp +++ b/src/layout/algorithm/Algorithm.hpp @@ -20,38 +20,38 @@ namespace Layout { static SP create(UP&& tiled, UP&& floating, SP space); ~CAlgorithm() = default; - void addTarget(SP target); - void moveTarget(SP target, std::optional focalPoint = std::nullopt, bool reposition = false); - void removeTarget(SP target); + void addTarget(SP target); + void moveTarget(SP target, std::optional focalPoint = std::nullopt, bool reposition = false); + void removeTarget(SP target); - void swapTargets(SP a, SP b); - void moveTargetInDirection(SP t, Math::eDirection dir, bool silent); + void swapTargets(SP a, SP b); + void moveTargetInDirection(SP t, Math::eDirection dir, bool silent); - SP getNextCandidate(SP old); + SP getNextCandidate(SP old); - void setFloating(SP target, bool floating, bool reposition = false); + void setFloating(SP target, bool floating, bool reposition = false); - std::expected layoutMsg(const std::string_view& sv); - std::optional predictSizeForNewTiledTarget(); + Config::ErrorResult layoutMsg(const std::string_view& sv); + std::optional predictSizeForNewTiledTarget(); - void recalculate(); - void recenter(SP t); + void recalculate(); + void recenter(SP t); - void resizeTarget(const Vector2D& Δ, SP target, eRectCorner corner = CORNER_NONE); - void moveTarget(const Vector2D& Δ, SP target); + void resizeTarget(const Vector2D& Δ, SP target, eRectCorner corner = CORNER_NONE); + void moveTarget(const Vector2D& Δ, SP target); - void setTargetGeom(const CBox& box, SP target); // only for float + void setTargetGeom(const CBox& box, SP target); // only for float - void updateFloatingAlgo(UP&& algo); - void updateTiledAlgo(UP&& algo); + void updateFloatingAlgo(UP&& algo); + void updateTiledAlgo(UP&& algo); - const UP& tiledAlgo() const; - const UP& floatingAlgo() const; + const UP& tiledAlgo() const; + const UP& floatingAlgo() const; - SP space() const; + SP space() const; - size_t tiledTargets() const; - size_t floatingTargets() const; + size_t tiledTargets() const; + size_t floatingTargets() const; private: CAlgorithm(UP&& tiled, UP&& floating, SP space); @@ -63,4 +63,4 @@ namespace Layout { std::vector> m_tiledTargets, m_floatingTargets; }; -} \ No newline at end of file +} -- cgit v1.2.3