summaryrefslogtreecommitdiff
path: root/src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-28 18:10:25 +0100
committerGitHub <noreply@github.com>2026-04-28 18:10:25 +0100
commit94b90a2cb0b4a0e13018cd5ebbf09394abf3b96b (patch)
tree484d32baaab1acdaab7a817c86aa89f117a21059 /src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp
parentab75bbfbecdfb4a0355106f740944c87cb9edd4c (diff)
config/lua: add ExpressionVec2, allow using a table for vec2 rules (#14197)
Diffstat (limited to 'src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp')
-rw-r--r--src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp b/src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp
index 0d069e4f..f8f89fcb 100644
--- a/src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp
+++ b/src/layout/algorithm/floating/default/DefaultFloatingAlgorithm.cpp
@@ -50,10 +50,10 @@ void CDefaultFloatingAlgorithm::newTarget(SP<ITarget> target) {
// set this here so that expressions can use it. This could be wrong of course.
WINDOW->m_realSize->setValueAndWarp(DESIRED_GEOM ? DESIRED_GEOM->size : DEFAULT_SIZE);
- if (!WINDOW->m_ruleApplicator->static_.size.empty()) {
- const auto COMPUTED = WINDOW->calculateExpression(WINDOW->m_ruleApplicator->static_.size);
+ if (WINDOW->m_ruleApplicator->static_.size) {
+ const auto COMPUTED = WINDOW->calculateExpression(*WINDOW->m_ruleApplicator->static_.size);
if (!COMPUTED)
- Log::logger->log(Log::ERR, "failed to parse {} as an expression", WINDOW->m_ruleApplicator->static_.size);
+ Log::logger->log(Log::ERR, "failed to parse {} as an expression", WINDOW->m_ruleApplicator->static_.size->toString());
else {
windowGeometry.w = COMPUTED->x;
windowGeometry.h = COMPUTED->y;
@@ -63,10 +63,10 @@ void CDefaultFloatingAlgorithm::newTarget(SP<ITarget> target) {
}
}
- if (!WINDOW->m_ruleApplicator->static_.position.empty()) {
- const auto COMPUTED = WINDOW->calculateExpression(WINDOW->m_ruleApplicator->static_.position);
+ if (WINDOW->m_ruleApplicator->static_.position) {
+ const auto COMPUTED = WINDOW->calculateExpression(*WINDOW->m_ruleApplicator->static_.position);
if (!COMPUTED)
- Log::logger->log(Log::ERR, "failed to parse {} as an expression", WINDOW->m_ruleApplicator->static_.position);
+ Log::logger->log(Log::ERR, "failed to parse {} as an expression", WINDOW->m_ruleApplicator->static_.position->toString());
else {
windowGeometry.x = COMPUTED->x + MONITOR_POS.x;
windowGeometry.y = COMPUTED->y + MONITOR_POS.y;