From addd3e7f1aeb670dd91d26005aaeccce3efb1ae7 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 May 2024 22:43:51 +0200 Subject: xwayland: move to hyprland impl (#6086) --- src/managers/CursorManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/managers/CursorManager.cpp') diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index ea36b9b2..c9783844 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -2,6 +2,7 @@ #include "Compositor.hpp" #include "../config/ConfigValue.hpp" #include "PointerManager.hpp" +#include "../xwayland/XWayland.hpp" extern "C" { #include @@ -246,14 +247,14 @@ SCursorImageData CCursorManager::dataFor(const std::string& name) { return IMAGES.images[0]; } -void CCursorManager::setXWaylandCursor(wlr_xwayland* xwayland) { +void CCursorManager::setXWaylandCursor() { const auto CURSOR = dataFor("left_ptr"); if (CURSOR.surface) { - wlr_xwayland_set_cursor(xwayland, cairo_image_surface_get_data(CURSOR.surface), cairo_image_surface_get_stride(CURSOR.surface), CURSOR.size, CURSOR.size, CURSOR.hotspotX, - CURSOR.hotspotY); + g_pXWayland->setCursor(cairo_image_surface_get_data(CURSOR.surface), cairo_image_surface_get_stride(CURSOR.surface), {CURSOR.size, CURSOR.size}, + {CURSOR.hotspotX, CURSOR.hotspotY}); } else if (const auto XCURSOR = wlr_xcursor_manager_get_xcursor(m_pWLRXCursorMgr, "left_ptr", 1); XCURSOR) { - wlr_xwayland_set_cursor(xwayland, XCURSOR->images[0]->buffer, XCURSOR->images[0]->width * 4, XCURSOR->images[0]->width, XCURSOR->images[0]->height, - XCURSOR->images[0]->hotspot_x, XCURSOR->images[0]->hotspot_y); + g_pXWayland->setCursor(XCURSOR->images[0]->buffer, XCURSOR->images[0]->width * 4, {XCURSOR->images[0]->width, XCURSOR->images[0]->height}, + {XCURSOR->images[0]->hotspot_x, XCURSOR->images[0]->hotspot_y}); } else Debug::log(ERR, "CursorManager: no valid cursor for xwayland"); } -- cgit v1.2.3