Re: [Spice-devel] [PATCH vdagent 2/2] vdagent: handle clipboard using GTK+

2018-02-18 Thread Victor Toso
Hi, On Sun, Feb 18, 2018 at 11:44:38PM +0100, Jakub Janku wrote: > >> +typedef struct { > >> +GMainLoop*loop; > >> +GtkSelectionData *sel_data; > >> +} DataRetrieval; > >> + > >> +struct VDAgentClipboards { > >> +struct udscs_connection*conn; > >> + > >> +

Re: [Spice-devel] [PATCH vdagent 1/2] vdagent-x11: remove clipboard handling

2018-02-18 Thread Jakub Janku
Hi, On Mon, Feb 12, 2018 at 10:40 AM, Victor Toso wrote: > Hi, > > Follow up after the comment in the cover letter. > > On Sun, Jan 21, 2018 at 09:03:13PM +0100, Jakub Janků wrote: >> From: Jakub Janků >> >> The code will be replaced by GTK+ in the

Re: [Spice-devel] [PATCH vdagent 2/2] vdagent: handle clipboard using GTK+

2018-02-18 Thread Jakub Janku
Hi Victor, sorry for the delayed reply. On Mon, Feb 12, 2018 at 2:11 PM, Victor Toso wrote: > Hi, > > On Sun, Jan 21, 2018 at 09:03:14PM +0100, Jakub Janků wrote: >> From: Jakub Janků >> >> Place the code that handles clipboard >> into a separate file

[Spice-devel] [PATCH spice-server 4/8] stream-device: Disable guest device on errors

2018-02-18 Thread Frediano Ziglio
To communicate the error and avoiding to have to read any data the guest want to write disable the device. Signed-off-by: Frediano Ziglio --- server/stream-device.c | 20 1 file changed, 20 insertions(+) diff --git a/server/stream-device.c

[Spice-devel] [PATCH spice-server 3/8] stream-device: Implements properly device reset on open/close

2018-02-18 Thread Frediano Ziglio
Due to the way Qemu handle the device we must consume all pending data inside the callback to read data from the device. We need to consume all data from previous device dialog to avoid that next device usage is still seeing old data. This as Qemu return 0 if you call

[Spice-devel] [PATCH spice-server 5/8] stream-device: Workaround Qemu bug closing device

2018-02-18 Thread Frediano Ziglio
Previous patch causes a bug into Qemu if the patch 46764fe09ca2e0f15c0981a672c166ed8cf57e72 ("virtio-serial: fix segfault on disconnect") is not include in that version of Qemu. This crash happens when device is closed inside a write operation. For SPICE character device a

[Spice-devel] [PATCH spice-server 1/8] test-stream-device: Better Qemu emulation for data reading

2018-02-18 Thread Frediano Ziglio
Qemu does not trigger a new data read if we don't read all data in the buffer. Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 43 +-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git

[Spice-devel] [PATCH spice-server 8/8] stream-channel: Send the full frame in a single message

2018-02-18 Thread Frediano Ziglio
The current implementation of server and client assume that a single data message contains an encoded frame. This is not a problem for most encoding but for MJPEG this causes the client to fail decoding. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 97

[Spice-devel] [PATCH spice-server 7/8] test-stream-device: Check we don't read past data message

2018-02-18 Thread Frediano Ziglio
Test case for the issue fixed by previous commit. Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 42 +++ 1 file changed, 42 insertions(+) diff --git a/server/tests/test-stream-device.c

[Spice-devel] [PATCH spice-server 2/8] test-stream-device: Test batched multiple messages

2018-02-18 Thread Frediano Ziglio
Test all batched (send together) messages are handled correctly and device is not stuck. Signed-off-by: Frediano Ziglio --- server/tests/test-stream-device.c | 36 1 file changed, 36 insertions(+) diff --git

[Spice-devel] [PATCH spice-server 6/8] stream-device: Do not read past data message

2018-02-18 Thread Frediano Ziglio
If data message is followed by another message was theoretically possible that device looses the sync with the guest. The actual Qemu and agent implementation avoids it but better to avoid it. Signed-off-by: Frediano Ziglio --- server/stream-device.c | 2 +- 1 file changed,

[Spice-devel] [PATCH spice-server 0/8] stream-device tests and stability patches

2018-02-18 Thread Frediano Ziglio
These patches fix some problem with streaming device adding also tests for different issues. Most of the patches was sent before on ML but still, for different reason not merged (one a problem with Qemu bug for which one there is a workaround in this series). Last patch fix MJPEG encoding and

Re: [Spice-devel] [PATCH spice-streaming-agent] Remove unused macro

2018-02-18 Thread Frediano Ziglio
> Signed-off-by: Snir Sheriber Acked > --- > src/mjpeg-fallback.cpp | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp > index 634864f..53d50ed 100644 > --- a/src/mjpeg-fallback.cpp > +++ b/src/mjpeg-fallback.cpp >

[Spice-devel] [PATCH spice-streaming-agent] Remove unused macro

2018-02-18 Thread Snir Sheriber
Signed-off-by: Snir Sheriber --- src/mjpeg-fallback.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp index 634864f..53d50ed 100644 --- a/src/mjpeg-fallback.cpp +++ b/src/mjpeg-fallback.cpp @@ -26,9 +26,6 @@ using

[Spice-devel] [PATCH vdagent-win] vdagent: fix loss of mouse movement events

2018-02-18 Thread free.user.name
send_input() may not be immediately called from handle_mouse_event() on movement. INPUT structure is generated and stored and a timer may be set instead. If subsequent call to handle_mouse_event() occurs before timer expires, prepared INPUT structure gets overwritten and MOUSEEVENTF_MOVE bit is