summaryrefslogtreecommitdiff
path: root/src/managers/PointerManager.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-06-08 10:07:59 +0200
committerGitHub <noreply@github.com>2024-06-08 10:07:59 +0200
commit6967a31450441fc5605c05db6f65505dace4b263 (patch)
tree255a3cff7f3e2eb8a50c952eab9b270a7937561d /src/managers/PointerManager.hpp
parentc31d9ef4172452f6f219f91d9b87a24d91f0cf3a (diff)
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl it's the final countdown
Diffstat (limited to 'src/managers/PointerManager.hpp')
-rw-r--r--src/managers/PointerManager.hpp14
1 files changed, 8 insertions, 6 deletions
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<IHID> dev);
void setCursorBuffer(wlr_buffer* buf, const Vector2D& hotspot, const float& scale);
- void setCursorSurface(CWLSurface* buf, const Vector2D& hotspot);
+ void setCursorSurface(SP<CWLSurface> buf, const Vector2D& hotspot);
void resetCursorImage(bool apply = true);
void lockSoftwareForMonitor(SP<CMonitor> pMonitor);
@@ -76,7 +77,7 @@ class CPointerManager {
Vector2D transformedHotspot(SP<CMonitor> pMonitor);
- wlr_texture* getCurrentCursorTexture();
+ SP<CTexture> 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<CTexture> bufferTex;
+ WP<CWLSurface> 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<SP<SMonitorPointerState>> monitorStates;
SP<SMonitorPointerState> stateFor(SP<CMonitor> mon);
bool attemptHardwareCursor(SP<SMonitorPointerState> state);
- wlr_buffer* renderHWCursorBuffer(SP<SMonitorPointerState> state, wlr_texture* texture);
+ wlr_buffer* renderHWCursorBuffer(SP<SMonitorPointerState> state, SP<CTexture> texture);
bool setHWCursorBuffer(SP<SMonitorPointerState> state, wlr_buffer* buf);
struct {