From 6967a31450441fc5605c05db6f65505dace4b263 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:07:59 +0200 Subject: wayland/core: move to new impl (#6268) * wayland/core/dmabuf: move to new impl it's the final countdown --- src/managers/PointerManager.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/managers/PointerManager.hpp') diff --git a/src/managers/PointerManager.hpp b/src/managers/PointerManager.hpp index db9f27e7..b71a79c3 100644 --- a/src/managers/PointerManager.hpp +++ b/src/managers/PointerManager.hpp @@ -11,6 +11,7 @@ class CMonitor; struct wlr_input_device; class IHID; +class CTexture; /* The naming here is a bit confusing. @@ -37,7 +38,7 @@ class CPointerManager { void warpAbsolute(Vector2D abs, SP dev); void setCursorBuffer(wlr_buffer* buf, const Vector2D& hotspot, const float& scale); - void setCursorSurface(CWLSurface* buf, const Vector2D& hotspot); + void setCursorSurface(SP buf, const Vector2D& hotspot); void resetCursorImage(bool apply = true); void lockSoftwareForMonitor(SP pMonitor); @@ -76,7 +77,7 @@ class CPointerManager { Vector2D transformedHotspot(SP pMonitor); - wlr_texture* getCurrentCursorTexture(); + SP getCurrentCursorTexture(); struct SPointerListener { CHyprSignalListener destroy; @@ -129,8 +130,9 @@ class CPointerManager { } currentMonitorLayout; struct { - wlr_buffer* pBuffer = nullptr; - CWLSurface* surface = nullptr; + wlr_buffer* pBuffer = nullptr; + SP bufferTex; + WP surface; wlr_texture* pBufferTexture = nullptr; Vector2D hotspot; @@ -138,7 +140,7 @@ class CPointerManager { float scale = 1.F; CHyprSignalListener destroySurface; - DYNLISTENER(commitSurface); + CHyprSignalListener commitSurface; DYNLISTENER(destroyBuffer); } currentCursorImage; // TODO: support various sizes per-output so we can have pixel-perfect cursors @@ -165,7 +167,7 @@ class CPointerManager { std::vector> monitorStates; SP stateFor(SP mon); bool attemptHardwareCursor(SP state); - wlr_buffer* renderHWCursorBuffer(SP state, wlr_texture* texture); + wlr_buffer* renderHWCursorBuffer(SP state, SP texture); bool setHWCursorBuffer(SP state, wlr_buffer* buf); struct { -- cgit v1.2.3