diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-05-25 22:43:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-25 22:43:51 +0200 |
| commit | addd3e7f1aeb670dd91d26005aaeccce3efb1ae7 (patch) | |
| tree | 7eae3cf1d780ab84ff34ee0fce5ed85d9ee69c90 /src/managers/CursorManager.cpp | |
| parent | a71207434c0bc2c8e05e94b1619e68059a002879 (diff) | |
xwayland: move to hyprland impl (#6086)
Diffstat (limited to 'src/managers/CursorManager.cpp')
| -rw-r--r-- | src/managers/CursorManager.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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 <wlr/interfaces/wlr_buffer.h> @@ -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"); } |
