summaryrefslogtreecommitdiff
path: root/src/layout/target/WindowTarget.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-05-07 15:21:06 +0100
committerGitHub <noreply@github.com>2026-05-07 15:21:06 +0100
commit58833eb1d79d7f03402cee0730c309b79f2e4501 (patch)
tree180cadc5d2e6fcb9e2f090eeccc6fb4ccace9b51 /src/layout/target/WindowTarget.cpp
parent6b8b20100253c083227e611be20360f4d8e7794e (diff)
layout/scrolling: handle fullscreen manually (#14190)
Makes scroll handle fullscreen by itself, allowing for fs scrolls.
Diffstat (limited to 'src/layout/target/WindowTarget.cpp')
-rw-r--r--src/layout/target/WindowTarget.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/layout/target/WindowTarget.cpp b/src/layout/target/WindowTarget.cpp
index 13984104..9258b4ae 100644
--- a/src/layout/target/WindowTarget.cpp
+++ b/src/layout/target/WindowTarget.cpp
@@ -43,7 +43,7 @@ void CWindowTarget::updatePos() {
if (!m_space)
return;
- if (fullscreenMode() == FSMODE_FULLSCREEN)
+ if (fullscreenMode() == FSMODE_FULLSCREEN && !layoutManagedFullscreen())
return;
if (floating() && fullscreenMode() != FSMODE_MAXIMIZED) {
@@ -83,7 +83,24 @@ void CWindowTarget::updatePos() {
return;
}
- if (fullscreenMode() == FSMODE_FULLSCREEN)
+ if (fullscreenMode() == FSMODE_FULLSCREEN && layoutManagedFullscreen()) {
+ CBox nodeBox = m_box.logicalBox;
+ CBox visualBox = m_box.visualBox.empty() ? nodeBox : m_box.visualBox;
+ nodeBox.round();
+ visualBox.round();
+
+ m_window->m_size = nodeBox.size();
+ m_window->m_position = nodeBox.pos();
+
+ *m_window->m_realSize = visualBox.size();
+ *m_window->m_realPosition = visualBox.pos();
+
+ m_window->updateWindowDecos();
+ m_window->sendWindowSize();
+ return;
+ }
+
+ if (fullscreenMode() == FSMODE_FULLSCREEN && !layoutManagedFullscreen())
return;
g_pHyprRenderer->damageWindow(window());
@@ -206,6 +223,7 @@ void CWindowTarget::updatePos() {
}
m_window->updateWindowDecos();
+ m_window->sendWindowSize();
}
void CWindowTarget::assignToSpace(const SP<CSpace>& space, std::optional<Vector2D> focalPoint) {
@@ -214,6 +232,8 @@ void CWindowTarget::assignToSpace(const SP<CSpace>& space, std::optional<Vector2
return;
}
+ m_window->m_layoutFlags = {};
+
// keep the ref here so that moveToWorkspace doesn't unref the workspace
// and assignToSpace doesn't think this is a new target because space wp is dead
const auto WSREF = space->workspace();
@@ -236,6 +256,8 @@ void CWindowTarget::setFloating(bool x) {
if (x == m_window->m_isFloating)
return;
+ m_window->m_layoutFlags = {};
+
m_window->m_isFloating = x;
m_window->m_pinned = false;