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/LayoutManager.hpp | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'src/layout/LayoutManager.hpp') diff --git a/src/layout/LayoutManager.hpp b/src/layout/LayoutManager.hpp index e99911d5..2660cf28 100644 --- a/src/layout/LayoutManager.hpp +++ b/src/layout/LayoutManager.hpp @@ -3,6 +3,7 @@ #include "../helpers/memory/Memory.hpp" #include "../helpers/math/Math.hpp" #include "../managers/input/InputManager.hpp" +#include "../config/shared/ConfigErrors.hpp" #include "supplementary/DragController.hpp" @@ -44,38 +45,38 @@ namespace Layout { CLayoutManager(); ~CLayoutManager() = default; - void newTarget(SP target, SP space); - void removeTarget(SP target); + void newTarget(SP target, SP space); + void removeTarget(SP target); - void changeFloatingMode(SP target); + void changeFloatingMode(SP target); - void beginDragTarget(SP target, eMouseBindMode mode); - void moveMouse(const Vector2D& mousePos); - void resizeTarget(const Vector2D& Δ, SP target, eRectCorner corner = CORNER_NONE); - void moveTarget(const Vector2D& Δ, SP target); - void setTargetGeom(const CBox& box, SP target); // floats only - void endDragTarget(); + void beginDragTarget(SP target, eMouseBindMode mode); + void moveMouse(const Vector2D& mousePos); + void resizeTarget(const Vector2D& Δ, SP target, eRectCorner corner = CORNER_NONE); + void moveTarget(const Vector2D& Δ, SP target); + void setTargetGeom(const CBox& box, SP target); // floats only + void endDragTarget(); - std::expected layoutMsg(const std::string_view& sv); + Config::ErrorResult layoutMsg(const std::string_view& sv); - void fullscreenRequestForTarget(SP target, eFullscreenMode currentEffectiveMode, eFullscreenMode effectiveMode); + void fullscreenRequestForTarget(SP target, eFullscreenMode currentEffectiveMode, eFullscreenMode effectiveMode); - void switchTargets(SP a, SP b, bool preserveFocus = true); + void switchTargets(SP a, SP b, bool preserveFocus = true); - void moveInDirection(SP target, const std::string& direction, bool silent = false); + void moveInDirection(SP target, const std::string& direction, bool silent = false); - SP getNextCandidate(SP space, SP from); + SP getNextCandidate(SP space, SP from); - bool isReachable(SP target); + bool isReachable(SP target); - void bringTargetToTop(SP target); + void bringTargetToTop(SP target); - std::optional predictSizeForNewTiledTarget(); + std::optional predictSizeForNewTiledTarget(); - void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, SP target, eMouseBindMode mode, int corner, const Vector2D& beginSize); + void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, SP target, eMouseBindMode mode, int corner, const Vector2D& beginSize); - void invalidateMonitorGeometries(PHLMONITOR); - void recalculateMonitor(PHLMONITOR); + void invalidateMonitorGeometries(PHLMONITOR); + void recalculateMonitor(PHLMONITOR); const UP& dragController(); @@ -84,4 +85,4 @@ namespace Layout { }; } -inline UP g_layoutManager; \ No newline at end of file +inline UP g_layoutManager; -- cgit v1.2.3