summaryrefslogtreecommitdiff
path: root/src/layout/algorithm/FloatingAlgorithm.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-02-21 21:30:39 +0000
committerGitHub <noreply@github.com>2026-02-21 21:30:39 +0000
commit723870337f299d4c80aa0048144f3a1ca1c885bd (patch)
treeca3279ae5dbc841f676c64d2f58f895de13cd3bf /src/layout/algorithm/FloatingAlgorithm.cpp
parent51f8849e541f0a8150ac3a43fa928c1e299daf18 (diff)
layout: rethonk layouts from the ground up (#12890)
Rewrites layouts to be much smaller, and deal with much less annoying BS. Improves the overall architecture, unifies handling of pseudotiling, and various other improvements.
Diffstat (limited to 'src/layout/algorithm/FloatingAlgorithm.cpp')
-rw-r--r--src/layout/algorithm/FloatingAlgorithm.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/layout/algorithm/FloatingAlgorithm.cpp b/src/layout/algorithm/FloatingAlgorithm.cpp
new file mode 100644
index 00000000..058887bf
--- /dev/null
+++ b/src/layout/algorithm/FloatingAlgorithm.cpp
@@ -0,0 +1,18 @@
+#include "FloatingAlgorithm.hpp"
+#include "Algorithm.hpp"
+#include "../space/Space.hpp"
+
+using namespace Layout;
+
+void IFloatingAlgorithm::recalculate() {
+ ;
+}
+
+void IFloatingAlgorithm::recenter(SP<ITarget> t) {
+ const auto LAST = t->lastFloatingSize();
+
+ if (LAST.x <= 5 || LAST.y <= 5)
+ return;
+
+ t->setPositionGlobal({m_parent->space()->workArea().middle() - LAST / 2.F, LAST});
+}