diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-05-07 15:21:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-07 15:21:06 +0100 |
| commit | 58833eb1d79d7f03402cee0730c309b79f2e4501 (patch) | |
| tree | 180cadc5d2e6fcb9e2f090eeccc6fb4ccace9b51 /src/protocols/PointerConstraints.cpp | |
| parent | 6b8b20100253c083227e611be20360f4d8e7794e (diff) | |
layout/scrolling: handle fullscreen manually (#14190)
Makes scroll handle fullscreen by itself, allowing for fs scrolls.
Diffstat (limited to 'src/protocols/PointerConstraints.cpp')
| -rw-r--r-- | src/protocols/PointerConstraints.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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) |
