diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-12-08 15:04:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-08 15:04:40 +0000 |
| commit | 920353370bba555010506a1c0b204675c60362fe (patch) | |
| tree | 87ba1036ecad6294a9c86dfc828ed2a356c810bd /src/protocols/PointerConstraints.cpp | |
| parent | 834f019bab5df85b912a7aab7054fc8306f7c52a (diff) | |
desktop: cleanup, unify desktop elements as views (#12563)
Diffstat (limited to 'src/protocols/PointerConstraints.cpp')
| -rw-r--r-- | src/protocols/PointerConstraints.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/protocols/PointerConstraints.cpp b/src/protocols/PointerConstraints.cpp index 5ecaa43b..1277ba12 100644 --- a/src/protocols/PointerConstraints.cpp +++ b/src/protocols/PointerConstraints.cpp @@ -1,7 +1,7 @@ #include "PointerConstraints.hpp" -#include "../desktop/WLSurface.hpp" +#include "../desktop/view/WLSurface.hpp" #include "../desktop/state/FocusState.hpp" -#include "../desktop/Window.hpp" +#include "../desktop/view/Window.hpp" #include "../config/ConfigValue.hpp" #include "../managers/SeatManager.hpp" #include "core/Compositor.hpp" @@ -17,7 +17,7 @@ CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWL resource_->setOnDestroy([this](CZwpLockedPointerV1* p) { PROTO::constraints->destroyPointerConstraint(this); }); resource_->setDestroy([this](CZwpLockedPointerV1* p) { PROTO::constraints->destroyPointerConstraint(this); }); - m_hlSurface = CWLSurface::fromResource(surf); + m_hlSurface = Desktop::View::CWLSurface::fromResource(surf); if (!m_hlSurface) return; @@ -35,7 +35,7 @@ CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWL m_hintSet = true; float scale = 1.f; - const auto PWINDOW = m_hlSurface->getWindow(); + const auto PWINDOW = Desktop::View::CWindow::fromView(m_hlSurface->view()); if (PWINDOW) { const auto ISXWL = PWINDOW->m_isX11; scale = ISXWL && *PXWLFORCESCALEZERO ? PWINDOW->m_X11SurfaceScaledBy : 1.f; @@ -56,7 +56,7 @@ CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<C resource_->setOnDestroy([this](CZwpConfinedPointerV1* p) { PROTO::constraints->destroyPointerConstraint(this); }); resource_->setDestroy([this](CZwpConfinedPointerV1* p) { PROTO::constraints->destroyPointerConstraint(this); }); - m_hlSurface = CWLSurface::fromResource(surf); + m_hlSurface = Desktop::View::CWLSurface::fromResource(surf); if (!m_hlSurface) return; @@ -159,7 +159,7 @@ void CPointerConstraint::onSetRegion(wl_resource* wlRegion) { g_pInputManager->simulateMouseMovement(); // to warp the cursor if anything's amiss } -SP<CWLSurface> CPointerConstraint::owner() { +SP<Desktop::View::CWLSurface> CPointerConstraint::owner() { return m_hlSurface.lock(); } |
