[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
2021-07-29 16:31:07 -04:00
committed by Geoffrey McRae
parent c991de7ccd
commit da28db2ca4
8 changed files with 34 additions and 16 deletions

View File

@@ -94,7 +94,7 @@ void app_handleFocusEvent(bool focused)
app_handleKeyRelease(key);
if (!g_params.showCursorDot)
g_state.ds->showPointer(false);
g_state.ds->setPointer(LG_POINTER_NONE);
if (g_params.minimizeOnFocusLoss)
g_state.ds->minimize();

View File

@@ -66,7 +66,7 @@ void core_setCursorInView(bool enable)
if (enable)
{
if (g_params.hideMouse)
g_state.ds->showPointer(false);
g_state.ds->setPointer(LG_POINTER_NONE);
if (warpSupport != LG_DS_WARP_NONE && !g_params.captureInputOnly)
g_state.ds->grabPointer();
@@ -77,7 +77,7 @@ void core_setCursorInView(bool enable)
else
{
if (g_params.hideMouse)
g_state.ds->showPointer(true);
g_state.ds->setPointer(LG_POINTER_SQUARE);
if (warpSupport != LG_DS_WARP_NONE)
g_state.ds->ungrabPointer();
@@ -102,7 +102,7 @@ void core_setGrabQuiet(bool enable)
{
/* we always do this so that at init the cursor is in the right state */
if (g_params.captureInputOnly && g_params.hideMouse)
g_state.ds->showPointer(!enable);
g_state.ds->setPointer(enable ? LG_POINTER_NONE : LG_POINTER_SQUARE);
if (g_cursor.grab == enable)
return;

View File

@@ -92,9 +92,9 @@ static void lgInit(void)
// if spice is not in use, hide the local cursor
if (!core_inputEnabled() && g_params.hideMouse)
g_state.ds->showPointer(false);
g_state.ds->setPointer(LG_POINTER_NONE);
else
g_state.ds->showPointer(true);
g_state.ds->setPointer(LG_POINTER_SQUARE);
}
static bool fpsTimerFn(void * unused)