From 58833eb1d79d7f03402cee0730c309b79f2e4501 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 7 May 2026 15:21:06 +0100 Subject: layout/scrolling: handle fullscreen manually (#14190) Makes scroll handle fullscreen by itself, allowing for fs scrolls. --- src/protocols/PointerConstraints.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/protocols/PointerConstraints.cpp') diff --git a/src/protocols/PointerConstraints.cpp b/src/protocols/PointerConstraints.cpp index 8bfa8b3a..d958c097 100644 --- a/src/protocols/PointerConstraints.cpp +++ b/src/protocols/PointerConstraints.cpp @@ -127,9 +127,11 @@ void CPointerConstraint::activate() { // TODO: hack, probably not a super duper great idea if (g_pSeatManager->m_state.pointerFocus != m_hlSurface->resource()) { - const auto SURFBOX = m_hlSurface->getSurfaceBoxGlobal(); - const auto LOCAL = SURFBOX.has_value() ? logicPositionHint() - SURFBOX->pos() : Vector2D{}; - g_pSeatManager->setPointerFocus(m_hlSurface->resource(), LOCAL); + if (const auto W = Desktop::View::CWindow::fromView(m_hlSurface->view()); !W || !W->m_layoutFlags.cantLockCursor) { + const auto SURFBOX = m_hlSurface->getSurfaceBoxGlobal(); + const auto LOCAL = SURFBOX.has_value() ? logicPositionHint() - SURFBOX->pos() : Vector2D{}; + g_pSeatManager->setPointerFocus(m_hlSurface->resource(), LOCAL); + } } if (m_locked) -- cgit v1.2.3