Support Hyprland 0.56 plugin API
This commit is contained in:
+4
-3
@@ -39,7 +39,7 @@ namespace Layout::Tiled {
|
|||||||
// Intentionally ignored: this layout always keeps equal-width columns.
|
// Intentionally ignored: this layout always keeps equal-width columns.
|
||||||
}
|
}
|
||||||
|
|
||||||
void recalculate() override {
|
void recalculate(eRecalculateReason /*reason*/ = RECALCULATE_REASON_UNKNOWN) override {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
const auto parent = m_parent.lock();
|
const auto parent = m_parent.lock();
|
||||||
@@ -93,7 +93,7 @@ namespace Layout::Tiled {
|
|||||||
return targets[(idx + 1) % targets.size()];
|
return targets[(idx + 1) % targets.size()];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::expected<void, std::string> layoutMsg(const std::string_view& sv) override {
|
Config::ErrorResult layoutMsg(const std::string_view& sv) override {
|
||||||
if (sv == "togglesplit" || sv == "swapsplit")
|
if (sv == "togglesplit" || sv == "swapsplit")
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
@@ -102,7 +102,8 @@ namespace Layout::Tiled {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::unexpected(std::string{"columns: unsupported layout message: "} + std::string{sv});
|
return Config::configError(std::string{"columns: unsupported layout message: "} + std::string{sv},
|
||||||
|
Config::eConfigErrorLevel::ERROR, Config::eConfigErrorCode::INVALID_ARGUMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Vector2D> predictSizeForNewTarget() override {
|
std::optional<Vector2D> predictSizeForNewTarget() override {
|
||||||
|
|||||||
Reference in New Issue
Block a user