diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-28 15:56:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-28 15:56:07 +0100 |
| commit | 98fbbafef78057c818fb02b15c27e38ad2f5b5bc (patch) | |
| tree | c62aa1eae704e7595d58f7edeb3804e8bfd0099d /src/layout/space | |
| parent | d4c6ff434c5c7aa66bc7c28e5ce336d2a694bfcc (diff) | |
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()
Diffstat (limited to 'src/layout/space')
| -rw-r--r-- | src/layout/space/Space.cpp | 2 | ||||
| -rw-r--r-- | src/layout/space/Space.hpp | 44 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/layout/space/Space.cpp b/src/layout/space/Space.cpp index 27f90e36..26c02aae 100644 --- a/src/layout/space/Space.cpp +++ b/src/layout/space/Space.cpp @@ -162,7 +162,7 @@ void CSpace::setFullscreen(SP<ITarget> t, eFullscreenMode mode) { recalculate(); } -std::expected<void, std::string> CSpace::layoutMsg(const std::string_view& sv) { +Config::ErrorResult CSpace::layoutMsg(const std::string_view& sv) { if (m_algorithm) return m_algorithm->layoutMsg(sv); diff --git a/src/layout/space/Space.hpp b/src/layout/space/Space.hpp index e29a6d8f..5d7f9d01 100644 --- a/src/layout/space/Space.hpp +++ b/src/layout/space/Space.hpp @@ -20,38 +20,38 @@ namespace Layout { static SP<CSpace> create(PHLWORKSPACE w); ~CSpace() = default; - void add(SP<ITarget> t); - void remove(SP<ITarget> t); - void move(SP<ITarget> t, std::optional<Vector2D> focalPoint = std::nullopt); + void add(SP<ITarget> t); + void remove(SP<ITarget> t); + void move(SP<ITarget> t, std::optional<Vector2D> focalPoint = std::nullopt); - void swap(SP<ITarget> a, SP<ITarget> b); + void swap(SP<ITarget> a, SP<ITarget> b); - SP<ITarget> getNextCandidate(SP<ITarget> old); + SP<ITarget> getNextCandidate(SP<ITarget> old); - void setAlgorithmProvider(SP<CAlgorithm> algo); - void recheckWorkArea(); - void setFullscreen(SP<ITarget> t, eFullscreenMode mode); + void setAlgorithmProvider(SP<CAlgorithm> algo); + void recheckWorkArea(); + void setFullscreen(SP<ITarget> t, eFullscreenMode mode); - void moveTargetInDirection(SP<ITarget> t, Math::eDirection dir, bool silent); + void moveTargetInDirection(SP<ITarget> t, Math::eDirection dir, bool silent); - void recalculate(); + void recalculate(); - void toggleTargetFloating(SP<ITarget> t); + void toggleTargetFloating(SP<ITarget> t); - std::expected<void, std::string> layoutMsg(const std::string_view& sv); - std::optional<Vector2D> predictSizeForNewTiledTarget(); + Config::ErrorResult layoutMsg(const std::string_view& sv); + std::optional<Vector2D> predictSizeForNewTiledTarget(); - const CBox& workArea(bool floating = false) const; - PHLWORKSPACE workspace() const; - CBox targetPositionLocal(SP<ITarget> t) const; + const CBox& workArea(bool floating = false) const; + PHLWORKSPACE workspace() const; + CBox targetPositionLocal(SP<ITarget> t) const; - void resizeTarget(const Vector2D& Δ, SP<ITarget> target, eRectCorner corner = CORNER_NONE); - void moveTarget(const Vector2D& Δ, SP<ITarget> target); - void setTargetGeom(const CBox& box, SP<ITarget> target); // only for float + void resizeTarget(const Vector2D& Δ, SP<ITarget> target, eRectCorner corner = CORNER_NONE); + void moveTarget(const Vector2D& Δ, SP<ITarget> target); + void setTargetGeom(const CBox& box, SP<ITarget> target); // only for float - SP<CAlgorithm> algorithm() const; + SP<CAlgorithm> algorithm() const; - const std::vector<WP<ITarget>>& targets() const; + const std::vector<WP<ITarget>>& targets() const; private: CSpace(PHLWORKSPACE parent); @@ -68,4 +68,4 @@ namespace Layout { // for recalc CHyprSignalListener m_geomUpdateCallback; }; -};
\ No newline at end of file +}; |
