[client] wayland: make cursor change work without wl_pointer

This commit is contained in:
Quantum 2021-12-06 20:35:36 -05:00 committed by Geoffrey McRae
parent 43545a4e17
commit a5727262cd
3 changed files with 6 additions and 4 deletions

View File

@ -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;
if (wlWm.pointer)
wl_pointer_set_cursor(wlWm.pointer, wlWm.pointerEnterSerial, wlWm.cursor, wlWm.cursorHotX, wlWm.cursorHotY);
}

View File

@ -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);
}
}

View File

@ -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;