diff --git a/client/displayservers/Wayland/cursor.c b/client/displayservers/Wayland/cursor.c index 11ca15c1..34f488ee 100644 --- a/client/displayservers/Wayland/cursor.c +++ b/client/displayservers/Wayland/cursor.c @@ -217,5 +217,6 @@ void waylandSetPointer(LG_DSPointer pointer) wlWm.cursor = wlWm.cursors[pointer]; wlWm.cursorHotX = wlWm.cursorHot[pointer].x; wlWm.cursorHotY = wlWm.cursorHot[pointer].y; - wl_pointer_set_cursor(wlWm.pointer, wlWm.pointerEnterSerial, wlWm.cursor, wlWm.cursorHotX, wlWm.cursorHotY); + if (wlWm.pointer) + wl_pointer_set_cursor(wlWm.pointer, wlWm.pointerEnterSerial, wlWm.cursor, wlWm.cursorHotX, wlWm.cursorHotY); } diff --git a/client/displayservers/Wayland/input.c b/client/displayservers/Wayland/input.c index 4cc5d01f..765a4543 100644 --- a/client/displayservers/Wayland/input.c +++ b/client/displayservers/Wayland/input.c @@ -304,6 +304,7 @@ static void handlePointerCapability(uint32_t capabilities) { wlWm.pointer = wl_seat_get_pointer(wlWm.seat); wl_pointer_add_listener(wlWm.pointer, &pointerListener, NULL); + waylandSetPointer(wlWm.cursorId); } } diff --git a/client/displayservers/Wayland/wayland.c b/client/displayservers/Wayland/wayland.c index 05c3d469..3bfdadc4 100644 --- a/client/displayservers/Wayland/wayland.c +++ b/client/displayservers/Wayland/wayland.c @@ -95,6 +95,9 @@ static bool waylandInit(const LG_DSInitParams params) if (!waylandPresentationInit()) return false; + if (!waylandCursorInit()) + return false; + if (!waylandInputInit()) return false; @@ -104,9 +107,6 @@ static bool waylandInit(const LG_DSInitParams params) if (!waylandEGLInit(params.w, params.h)) return false; - if (!waylandCursorInit()) - return false; - #ifdef ENABLE_OPENGL if (params.opengl && !waylandOpenGLInit()) return false;