mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[client] app: cleanup clipboard option logic
This commit is contained in:
parent
b657b57016
commit
b2974c38ef
@ -128,6 +128,9 @@ void app_clipboardRelease(void)
|
||||
|
||||
void app_clipboardNotifyTypes(const LG_ClipboardData types[], int count)
|
||||
{
|
||||
if (!g_params.clipboardToVM)
|
||||
return;
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
spice_clipboard_release();
|
||||
|
@ -568,11 +568,14 @@ bool config_load(int argc, char * argv[])
|
||||
|
||||
if (g_params.useSpiceClipboard)
|
||||
{
|
||||
g_params.clipboardToVM = option_get_bool("spice", "clipboardToVM" );
|
||||
g_params.clipboardToLocal = option_get_bool("spice", "clipboardToLocal");
|
||||
|
||||
if (!g_params.clipboardToVM && !g_params.clipboardToLocal)
|
||||
g_params.useSpiceClipboard = false;
|
||||
g_params.clipboardToVM = option_get_bool("spice", "clipboardToVM" );
|
||||
g_params.clipboardToLocal = option_get_bool("spice", "clipboardToLocal");
|
||||
g_params.useSpiceClipboard = g_params.clipboardToVM || g_params.clipboardToLocal;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_params.clipboardToVM = false;
|
||||
g_params.clipboardToLocal = false;
|
||||
}
|
||||
|
||||
g_params.scaleMouseInput = option_get_bool("spice", "scaleCursor");
|
||||
|
@ -684,11 +684,12 @@ static int lg_run(void)
|
||||
// try to connect to the spice server
|
||||
if (g_params.useSpiceInput || g_params.useSpiceClipboard)
|
||||
{
|
||||
spice_set_clipboard_cb(
|
||||
cb_spiceNotice,
|
||||
cb_spiceData,
|
||||
cb_spiceRelease,
|
||||
cb_spiceRequest);
|
||||
if (g_params.useSpiceClipboard)
|
||||
spice_set_clipboard_cb(
|
||||
cb_spiceNotice,
|
||||
cb_spiceData,
|
||||
cb_spiceRelease,
|
||||
cb_spiceRequest);
|
||||
|
||||
if (!spice_connect(g_params.spiceHost, g_params.spicePort, ""))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user