From ed411f53bdcf8d455f9e6ca769693aa84dc8372f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 5 May 2024 22:18:10 +0100 Subject: cursor: move to a hyprland impl This moves wlr_cursor to a completely new impl mostly under CPointerManager Also adds beginSimple to OpenGL for simple render passes (e.g. cursor) --- src/devices/Mouse.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/devices/Mouse.cpp') diff --git a/src/devices/Mouse.cpp b/src/devices/Mouse.cpp index e2a6f4ed..b860298c 100644 --- a/src/devices/Mouse.cpp +++ b/src/devices/Mouse.cpp @@ -36,6 +36,7 @@ CMouse::CMouse(wlr_pointer* mouse_) : mouse(mouse_) { pointerEvents.motionAbsolute.emit(SMotionAbsoluteEvent{ .timeMs = E->time_msec, .absolute = {E->x, E->y}, + .device = self.lock(), }); }, this, "CMouse"); @@ -62,6 +63,10 @@ CMouse::CMouse(wlr_pointer* mouse_) : mouse(mouse_) { }); }, this, "CMouse"); + hyprListener_frame.initCallback(&mouse->events.frame, [this] (void* owner, void* data) { + pointerEvents.frame.emit(); + }, this, "CMouse"); + hyprListener_swipeBegin.initCallback(&mouse->events.swipe_begin, [this] (void* owner, void* data) { auto E = (wlr_pointer_swipe_begin_event*)data; -- cgit v1.2.3