From 920353370bba555010506a1c0b204675c60362fe Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:04:40 +0000 Subject: desktop: cleanup, unify desktop elements as views (#12563) --- src/protocols/PointerWarp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/protocols/PointerWarp.cpp') diff --git a/src/protocols/PointerWarp.cpp b/src/protocols/PointerWarp.cpp index bde0b913..83be492e 100644 --- a/src/protocols/PointerWarp.cpp +++ b/src/protocols/PointerWarp.cpp @@ -1,10 +1,10 @@ #include "PointerWarp.hpp" #include "core/Compositor.hpp" #include "core/Seat.hpp" -#include "../desktop/WLSurface.hpp" +#include "../desktop/view/WLSurface.hpp" #include "../managers/SeatManager.hpp" #include "../managers/PointerManager.hpp" -#include "../desktop/Window.hpp" +#include "../desktop/view/Window.hpp" CPointerWarpProtocol::CPointerWarpProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { ; @@ -27,11 +27,11 @@ void CPointerWarpProtocol::bindManager(wl_client* client, void* data, uint32_t v if (g_pSeatManager->m_state.pointerFocus != PSURFACE) return; - auto SURFBOXV = CWLSurface::fromResource(PSURFACE)->getSurfaceBoxGlobal(); - if (!SURFBOXV.has_value()) + auto WINDOW = Desktop::View::CWindow::fromView(Desktop::View::CWLSurface::fromResource(PSURFACE)->view()); + if (!WINDOW) return; - const auto SURFBOX = SURFBOXV->expand(1); + const auto SURFBOX = WINDOW->getWindowMainSurfaceBox().expand(1); const auto LOCALPOS = Vector2D{wl_fixed_to_double(x), wl_fixed_to_double(y)}; const auto GLOBALPOS = LOCALPOS + SURFBOX.pos(); if (!SURFBOX.containsPoint(GLOBALPOS)) -- cgit v1.2.3