mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38: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();
|
||||
|
@ -570,9 +570,12 @@ bool config_load(int argc, char * argv[])
|
||||
{
|
||||
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.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,6 +684,7 @@ static int lg_run(void)
|
||||
// try to connect to the spice server
|
||||
if (g_params.useSpiceInput || g_params.useSpiceClipboard)
|
||||
{
|
||||
if (g_params.useSpiceClipboard)
|
||||
spice_set_clipboard_cb(
|
||||
cb_spiceNotice,
|
||||
cb_spiceData,
|
||||
|
Loading…
Reference in New Issue
Block a user