[client] ds: change showPointer to setPointer for more cursors

Currently everything only supports LG_POINTER_NONE and LG_POINTER_SQUARE.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-07-31 14:56:04 +10:00
1 parent c991de7ccd
commit da28db2ca4
8 files changed
+34 -16

No files matched your search

+3 -3
View File
@@ -101,8 +101,8 @@ void waylandCursorFree(void)
wl_buffer_destroy(wlWm.cursorBuffer);
}
void waylandShowPointer(bool show)
void waylandSetPointer(LG_DSPointer pointer)
{
wlWm.showPointer = show;
wl_pointer_set_cursor(wlWm.pointer, wlWm.pointerEnterSerial, show ? wlWm.cursor : NULL, 0, 0);
wlWm.showPointer = pointer != LG_POINTER_NONE;
wl_pointer_set_cursor(wlWm.pointer, wlWm.pointerEnterSerial, wlWm.showPointer ? wlWm.cursor : NULL, 0, 0);
}
+1 -1
View File
@@ -165,7 +165,7 @@ struct LG_DisplayServerOps LGDS_Wayland =
.glSwapBuffers = waylandGLSwapBuffers,
#endif
.guestPointerUpdated = waylandGuestPointerUpdated,
.showPointer = waylandShowPointer,
.setPointer = waylandSetPointer,
.grabPointer = waylandGrabPointer,
.ungrabPointer = waylandUngrabPointer,
.capturePointer = waylandCapturePointer,
+1 -1
View File
@@ -207,7 +207,7 @@ void waylandCBInvalidate(void);
// cursor module
bool waylandCursorInit(void);
void waylandCursorFree(void);
void waylandShowPointer(bool show);
void waylandSetPointer(LG_DSPointer pointer);
// gl module
#if defined(ENABLE_EGL) || defined(ENABLE_OPENGL)
+3 -3
View File
@@ -1009,9 +1009,9 @@ static void x11GuestPointerUpdated(double x, double y, double localX, double loc
XSync(x11.display, False);
}
static void x11ShowPointer(bool show)
static void x11SetPointer(LG_DSPointer pointer)
{
if (show)
if (pointer != LG_POINTER_NONE)
XDefineCursor(x11.display, x11.window, x11.squareCursor);
else
XDefineCursor(x11.display, x11.window, x11.blankCursor);
@@ -1266,7 +1266,7 @@ struct LG_DisplayServerOps LGDS_X11 =
.glSwapBuffers = x11GLSwapBuffers,
#endif
.guestPointerUpdated = x11GuestPointerUpdated,
.showPointer = x11ShowPointer,
.setPointer = x11SetPointer,
.grabPointer = x11GrabPointer,
.ungrabPointer = x11UngrabPointer,
.capturePointer = x11CapturePointer,