summaryrefslogtreecommitdiff
path: root/src/protocols/PointerWarp.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-12-08 15:04:40 +0000
committerGitHub <noreply@github.com>2025-12-08 15:04:40 +0000
commit920353370bba555010506a1c0b204675c60362fe (patch)
tree87ba1036ecad6294a9c86dfc828ed2a356c810bd /src/protocols/PointerWarp.cpp
parent834f019bab5df85b912a7aab7054fc8306f7c52a (diff)
desktop: cleanup, unify desktop elements as views (#12563)
Diffstat (limited to 'src/protocols/PointerWarp.cpp')
-rw-r--r--src/protocols/PointerWarp.cpp10
1 files changed, 5 insertions, 5 deletions
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))