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)
|
void app_clipboardNotifyTypes(const LG_ClipboardData types[], int count)
|
||||||
{
|
{
|
||||||
|
if (!g_params.clipboardToVM)
|
||||||
|
return;
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
spice_clipboard_release();
|
spice_clipboard_release();
|
||||||
|
@ -568,11 +568,14 @@ bool config_load(int argc, char * argv[])
|
|||||||
|
|
||||||
if (g_params.useSpiceClipboard)
|
if (g_params.useSpiceClipboard)
|
||||||
{
|
{
|
||||||
g_params.clipboardToVM = option_get_bool("spice", "clipboardToVM" );
|
g_params.clipboardToVM = option_get_bool("spice", "clipboardToVM" );
|
||||||
g_params.clipboardToLocal = option_get_bool("spice", "clipboardToLocal");
|
g_params.clipboardToLocal = option_get_bool("spice", "clipboardToLocal");
|
||||||
|
g_params.useSpiceClipboard = g_params.clipboardToVM || g_params.clipboardToLocal;
|
||||||
if (!g_params.clipboardToVM && !g_params.clipboardToLocal)
|
}
|
||||||
g_params.useSpiceClipboard = false;
|
else
|
||||||
|
{
|
||||||
|
g_params.clipboardToVM = false;
|
||||||
|
g_params.clipboardToLocal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_params.scaleMouseInput = option_get_bool("spice", "scaleCursor");
|
g_params.scaleMouseInput = option_get_bool("spice", "scaleCursor");
|
||||||
|
@ -684,11 +684,12 @@ static int lg_run(void)
|
|||||||
// try to connect to the spice server
|
// try to connect to the spice server
|
||||||
if (g_params.useSpiceInput || g_params.useSpiceClipboard)
|
if (g_params.useSpiceInput || g_params.useSpiceClipboard)
|
||||||
{
|
{
|
||||||
spice_set_clipboard_cb(
|
if (g_params.useSpiceClipboard)
|
||||||
cb_spiceNotice,
|
spice_set_clipboard_cb(
|
||||||
cb_spiceData,
|
cb_spiceNotice,
|
||||||
cb_spiceRelease,
|
cb_spiceData,
|
||||||
cb_spiceRequest);
|
cb_spiceRelease,
|
||||||
|
cb_spiceRequest);
|
||||||
|
|
||||||
if (!spice_connect(g_params.spiceHost, g_params.spicePort, ""))
|
if (!spice_connect(g_params.spiceHost, g_params.spicePort, ""))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user