From 739c5bc98c6037101e5744827dd66e696a4e9ecd Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 9 Mar 2024 21:54:33 +0000 Subject: cursormgr: fix invalid access to hyprcursor in xwayland init fixes #5048 --- src/events/Misc.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/events/Misc.cpp') diff --git a/src/events/Misc.cpp b/src/events/Misc.cpp index d7e3a849..8d0a9710 100644 --- a/src/events/Misc.cpp +++ b/src/events/Misc.cpp @@ -70,11 +70,7 @@ void Events::listener_readyXWayland(wl_listener* listener, void* data) { wlr_xwayland_set_seat(g_pXWaylandManager->m_sWLRXWayland, g_pCompositor->m_sSeat.seat); - const auto CURSOR = g_pCursorManager->dataFor("left_ptr"); - if (CURSOR.surface) { - wlr_xwayland_set_cursor(g_pXWaylandManager->m_sWLRXWayland, cairo_image_surface_get_data(CURSOR.surface), cairo_image_surface_get_stride(CURSOR.surface), CURSOR.size, - CURSOR.size, CURSOR.hotspotX, CURSOR.hotspotY); - } + g_pCursorManager->setXWaylandCursor(g_pXWaylandManager->m_sWLRXWayland); const auto ROOT = xcb_setup_roots_iterator(xcb_get_setup(XCBCONNECTION)).data->root; auto cookie = xcb_get_property(XCBCONNECTION, 0, ROOT, HYPRATOMS["_NET_SUPPORTING_WM_CHECK"], XCB_ATOM_ANY, 0, 2048); -- cgit v1.2.3