mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[client] spice: update to support sending clipboard type list
This commit is contained in:
parent
118d9a086e
commit
28640295f1
@ -78,7 +78,8 @@ void app_glSwapBuffers(void);
|
||||
#endif
|
||||
|
||||
void app_clipboardRelease(void);
|
||||
void app_clipboardNotify(const LG_ClipboardData type, size_t size);
|
||||
void app_clipboardNotifyTypes(const LG_ClipboardData types[], int count);
|
||||
void app_clipboardNotifySize(const LG_ClipboardData type, size_t size);
|
||||
void app_clipboardData(const LG_ClipboardData type, uint8_t * data, size_t size);
|
||||
void app_clipboardRequest(const LG_ClipboardReplyFn replyFn, void * opaque);
|
||||
|
||||
|
@ -126,7 +126,22 @@ void app_clipboardRelease(void)
|
||||
spice_clipboard_release();
|
||||
}
|
||||
|
||||
void app_clipboardNotify(const LG_ClipboardData type, size_t size)
|
||||
void app_clipboardNotifyTypes(const LG_ClipboardData types[], int count)
|
||||
{
|
||||
if (count == 0)
|
||||
{
|
||||
spice_clipboard_release();
|
||||
return;
|
||||
}
|
||||
|
||||
SpiceDataType conv[count];
|
||||
for(int i = 0; i < count; ++i)
|
||||
conv[i] = cb_lgTypeToSpiceType(types[i]);
|
||||
|
||||
spice_clipboard_grab(conv, count);
|
||||
}
|
||||
|
||||
void app_clipboardNotifySize(const LG_ClipboardData type, size_t size)
|
||||
{
|
||||
if (!g_params.clipboardToVM)
|
||||
return;
|
||||
@ -141,10 +156,7 @@ void app_clipboardNotify(const LG_ClipboardData type, size_t size)
|
||||
g_state.cbChunked = size > 0;
|
||||
g_state.cbXfer = size;
|
||||
|
||||
spice_clipboard_grab(g_state.cbType);
|
||||
|
||||
if (size)
|
||||
spice_clipboard_data_start(g_state.cbType, size);
|
||||
spice_clipboard_data_start(g_state.cbType, size);
|
||||
}
|
||||
|
||||
void app_clipboardData(const LG_ClipboardData type, uint8_t * data, size_t size)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 64b58f3631dcac5175e624da78589befc99d5d28
|
||||
Subproject commit bd712980f88d7d923c6d3641da5ce5385722c608
|
Loading…
Reference in New Issue
Block a user