[client] spice: new option spice:showCursorDot added

This option if disabled will prevent the client from showing a "dot"
cursor when the mouse is over the window, but the window is unfocused.
This commit is contained in:
Geoffrey McRae 2021-04-29 12:50:43 +10:00
parent 4c0c8f804f
commit 9900b263d4
3 changed files with 18 additions and 6 deletions

View file

@ -63,6 +63,9 @@ void app_handleFocusEvent(bool focused)
for (int key = 0; key < KEY_MAX; key++)
if (g_state.keyDown[key])
app_handleKeyRelease(key);
if (!g_params.showCursorDot)
g_state.ds->showPointer(false);
}
g_cursor.realign = true;

View file

@ -421,6 +421,13 @@ static struct Option options[] =
.type = OPTION_TYPE_BOOL,
.value.x_bool = false
},
{
.module = "app",
.name = "showCursorDot",
.description = "Use a \"dot\" cursor when the window does not have focus",
.type = OPTION_TYPE_BOOL,
.value.x_bool = true
},
{0}
};
@ -483,9 +490,9 @@ bool config_load(int argc, char * argv[])
}
// setup the application params for the basic types
g_params.cursorPollInterval = option_get_int ("app", "cursorPollInterval");
g_params.framePollInterval = option_get_int ("app", "framePollInterval" );
g_params.allowDMA = option_get_bool ("app", "allowDMA" );
g_params.cursorPollInterval = option_get_int ("app" , "cursorPollInterval");
g_params.framePollInterval = option_get_int ("app" , "framePollInterval" );
g_params.allowDMA = option_get_bool ("app" , "allowDMA" );
g_params.windowTitle = option_get_string("win", "title" );
g_params.autoResize = option_get_bool ("win", "autoResize" );
@ -551,9 +558,10 @@ bool config_load(int argc, char * argv[])
g_params.useSpiceClipboard = false;
}
g_params.scaleMouseInput = option_get_bool("spice", "scaleCursor");
g_params.captureOnStart = option_get_bool("spice", "captureOnStart");
g_params.alwaysShowCursor = option_get_bool("spice", "alwaysShowCursor");
g_params.scaleMouseInput = option_get_bool("spice", "scaleCursor");
g_params.captureOnStart = option_get_bool("spice", "captureOnStart");
g_params.alwaysShowCursor = option_get_bool("spice", "alwaysShowCursor");
g_params.showCursorDot = option_get_bool("spice", "showCursorDot");
}
return true;

View file

@ -151,6 +151,7 @@ struct AppParams
bool rawMouse;
bool autoCapture;
bool captureInputOnly;
bool showCursorDot;
};
struct CBRequest