Re: [Spice-devel] [phodav PATCH 2/3 v5] spice-webdavd-windows: Check for mapped shared folder

2016-04-07 Thread Victor Toso
Hi, On Thu, Apr 07, 2016 at 05:44:52PM +0200, Lukas Venhoda wrote: > Check whether Spice Folder is already mapped. > If yes, don't try to map another one. > --- > Changes since v4: > - Moved some variables around > - Better debug message > - Fixed bug, that would cause the folder not to mount a

Re: [Spice-devel] [phodav PATCH 1/3 v5] spice-webdavd-windows: Automount shared folder

2016-04-07 Thread Victor Toso
Hi, On Thu, Apr 07, 2016 at 05:44:51PM +0200, Lukas Venhoda wrote: > Try to connect to shared folder automatically on Windows. > > On each loop of run_service(), run a GTask, that waits for half a second. > If read_thread() returns, it means, that sharing is not yet connected, > and the map_drive

Re: [Spice-devel] [spice-gtk PATCH] Usbredir: enable lz4 compression

2016-04-07 Thread Victor Toso
Hi, On Thu, Apr 07, 2016 at 05:38:41PM +0300, Snir Sheriber wrote: > On 04/04/2016 11:48 AM, Victor Toso wrote: > >Hi, > > > >On Sun, Apr 03, 2016 at 06:40:09PM +0300, Snir Sheriber wrote: > >>Compressed message type is CompressedData which contains compression > >>type (1 byte) followed by the un

[Spice-devel] [PATCH 02/14] RedCharDevice: Add typedef for class virtual functions

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau When initializing the class vfuncs, this allows us to cast already existing functions to the right type rather than having a wrapper function whose only purpose is to cast one argument to the right type. --- server/char-device.h | 33 ++--- se

[Spice-devel] [PATCH 12/14] Remove use of opaque from vdi_port_read_one_msg_from_device

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau We can get 'reds' from the RedCharDevice accessible from the SpiceCharDeviceInstance passed as an argument. --- server/reds.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/reds.c b/server/reds.c index 7dae569..ddd58e3 100644 --- a/serve

[Spice-devel] [PATCH 00/14] Backported some patches from refactory branch (April 7)

2016-04-07 Thread Jonathon Jongsma
Christophe Fergeau (14): Move RedCharDeviceCallbacks into RedCharDeviceClass RedCharDevice: Add typedef for class virtual functions Introduce simple RedPipeItem class reds: Put PipeItem first in VDIReadBuf reds: Derive VDIPortReadBuf from RedPipeItem FIXME/HACK: RedPipeItem/VDIPortBuf r

[Spice-devel] [PATCH 08/14] spicevmc: Derive SpiceVmcPipeItem from RedPipeItem

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau This allows to reuse red_pipe_item_{ref, unref} rather than reimplementing them in spicevmc.c --- server/spicevmc.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index b6ba19d..7

[Spice-devel] [PATCH 03/14] Introduce simple RedPipeItem class

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau This is similar to PipeItem (which is a type id + a RingItem linked list member), except that it's refcounted. A user-defined callback is called when the refcount drops to 0. Refcounted is open coded for several classes deriving from PipeItem, so this base class will help

[Spice-devel] [PATCH 11/14] Replace RedCharDevice::on_free_self_token with a signal

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau It's more natural to do things this way with glib, and this allows to remove some coupling between Reds and RedCharDeviceVDIPort. Before this commit, the RedCharDeviceVDIPort has to provide a on_free_self_token() because Reds needs to know about it. With a signal, RedChar

[Spice-devel] [PATCH 10/14] char-device: Remove RedCharDeviceClass::{un, }ref_msg_to_client

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau Now that client messages are always RedPipeItem, we don't need virtual functions to know how to ref/unref them. --- server/char-device.c | 26 -- server/char-device.h | 4 server/reds.c| 2 -- server/smartcard.c | 2 -- server/sp

[Spice-devel] [PATCH 04/14] reds: Put PipeItem first in VDIReadBuf

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau This is a bit artificial as this is not a real 'PipeItem', but it will allow us to make it use the common base class for refcounted pipe items. --- server/reds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/reds.c b/server/reds.c index 792e4

[Spice-devel] [PATCH 05/14] reds: Derive VDIPortReadBuf from RedPipeItem

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau Since RedPipeItem is already refcounted, this allows to remove various layers of ref/unref helpers from reds.c, and use the generic red_pipe_item_{ref, unref} instead. --- server/reds.c | 67 +++ 1 file changed, 31

[Spice-devel] [PATCH 14/14] Use weak gobject ref instead of reds_on_char_device_state_destroy

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau RedCharDevice implementation had to callback into reds.c in order to let it know a char device was being destroyed. Now that RedCharDevice is a gobject, a weak reference can be used instead allowing to remove that coupling. --- server/char-device.c | 2 -- server/reds.c

[Spice-devel] [PATCH 07/14] smartcard: Derive MsgItem from RedPipeItem

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau This allows to reuse red_pipe_item_{ref, unref} rather than reimplementing them in smartcard.c --- server/smartcard.c | 37 + 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/server/smartcard.c b/server/smartcard.c index

[Spice-devel] [PATCH 13/14] Use GQueue for RedCharDevice::send_queue

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau There was an extra RedCharDeviceMsgToClientItem type whose only purpose was to manage a linked list of items to send. GQueue has the same purpose as this type in addition to being generic. As the length of the send queue is tracked, a GQueue is more appropriate than a GLi

[Spice-devel] [PATCH 01/14] Move RedCharDeviceCallbacks into RedCharDeviceClass

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau This structure holding virtual function pointers was kept until now as a RedCharDevice member in order to make the GObject conversion easier. Now that all RedCharDevice children are converted to GObject, it can be moved into RedCharDeviceClass. --- server/char-device.c |

[Spice-devel] [PATCH 06/14] FIXME/HACK: RedPipeItem/VDIPortBuf refcounting hack

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau related to 7d375e0 workaround a runtime check in red_pipe_item_ref() --- server/reds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/reds.c b/server/reds.c index 64f7df8..bf39cf7 100644 --- a/server/reds.c +++ b/server/reds.c @@ -752,7 +752

[Spice-devel] [PATCH 09/14] char-device: Replace RedCharDeviceMsgToClient with RedPipeItem

2016-04-07 Thread Jonathon Jongsma
From: Christophe Fergeau Now that all derived classes use a type deriving from RedPipeItem for their RedCharDeviceMsgToClient, we can make this explicit in the RedCharDeviceClass vfuncs, and remove the RedCharDeviceMsgToClient typedef. --- server/char-device.c | 18 +- server/cha

[Spice-devel] [PATCH spice-gtk] Ensure that file transfers get cancelled

2016-04-07 Thread Jonathon Jongsma
When canceling a file transfer task in spicy, the client would often stop sending additional data, but it would not send a "CANCELLED" message to the guest. Because of this, the partial file would remain in the guest's downloads folder until the spice client disconnected, at which point the vdagent

Re: [Spice-devel] [PATCH 10/10] Move RedCharDeviceCallbacks into RedCharDeviceClass

2016-04-07 Thread Jonathon Jongsma
On Thu, 2016-04-07 at 11:54 +0200, Christophe Fergeau wrote: > On Fri, Apr 01, 2016 at 03:51:44PM -0500, Jonathon Jongsma wrote: > > diff --git a/server/smartcard.c b/server/smartcard.c > > index 52d56ea..0238efe 100644 > > --- a/server/smartcard.c > > +++ b/server/smartcard.c > > @@ -272,14 +272,6

Re: [Spice-devel] [PATCH spice-gtk] Do not call spice_egl_cursor_set when egl is disabled

2016-04-07 Thread Marc-André Lureau
Hi - Original Message - > Hi Marc-André, > > do you think it is reasonable to do something similar for other > spice_egl functions? Like calling spice_egl_init() lazily ? That makes sense, but I don't think it's really worth tbh, since gl is pretty much required by all desktop/toolkits

Re: [Spice-devel] [PATCH spice-gtk] Do not call spice_egl_cursor_set when egl is disabled

2016-04-07 Thread Pavel Grunt
Hi Marc-André, do you think it is reasonable to do something similar for other spice_egl functions? Like calling spice_egl_init() lazily ? Pavel On Thu, 2016-04-07 at 09:16 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > Fix memory leaks of cursor: > > > > 240 by

[Spice-devel] [phodav PATCH 2/3 v5] spice-webdavd-windows: Check for mapped shared folder

2016-04-07 Thread Lukas Venhoda
Check whether Spice Folder is already mapped. If yes, don't try to map another one. --- Changes since v4: - Moved some variables around - Better debug message - Fixed bug, that would cause the folder not to mount automatically Changes since v3: - changed function is_spice_folder_mapped to get_

[Spice-devel] [phodav PATCH 1/3 v5] spice-webdavd-windows: Automount shared folder

2016-04-07 Thread Lukas Venhoda
Try to connect to shared folder automatically on Windows. On each loop of run_service(), run a GTask, that waits for half a second. If read_thread() returns, it means, that sharing is not yet connected, and the map_drive task is cancelled. If the map_drive task is NOT cancelled, it enumerates fre

[Spice-devel] [phodav PATCH 3/3 v5] spice-webdavd-windows: Dismount shared folder on service stop

2016-04-07 Thread Lukas Venhoda
When stopping the service, automatically disconnect shared folder on windows. Not dismounting could lead to multiple shared folders. --- Changes since v4: - Dont lookup drive letter when unmapping - Uses a service_data structure and map_drive_data structure to store the drive_letter for

Re: [Spice-devel] [spice-gtk PATCH] Usbredir: enable lz4 compression

2016-04-07 Thread Snir Sheriber
On 04/04/2016 11:48 AM, Victor Toso wrote: Hi, On Sun, Apr 03, 2016 at 06:40:09PM +0300, Snir Sheriber wrote: Compressed message type is CompressedData which contains compression type (1 byte) followed by the uncompressed data size (4 bytes) followed by the compressed data size (4 bytes) foll

Re: [Spice-devel] [PATCH spice-gtk] Do not call spice_egl_cursor_set when egl is disabled

2016-04-07 Thread Marc-André Lureau
Hi - Original Message - > Fix memory leaks of cursor: > > 240 bytes in 1 blocks are possibly lost in loss record 10,786 of 12,521 >at 0x4C2FA60: calloc (vg_replace_malloc.c:711) >by 0x3700F861: ralloc_size (ralloc.c:113) >by 0x36FD2D68: UnknownInlinedFun (list.h:83) >by 0x

[Spice-devel] [PATCH spice-gtk] Do not call spice_egl_cursor_set when egl is disabled

2016-04-07 Thread Pavel Grunt
Fix memory leaks of cursor: 240 bytes in 1 blocks are possibly lost in loss record 10,786 of 12,521 at 0x4C2FA60: calloc (vg_replace_malloc.c:711) by 0x3700F861: ralloc_size (ralloc.c:113) by 0x36FD2D68: UnknownInlinedFun (list.h:83) by 0x36FD2D68: (anonymous namespace)::builtin_varia

[Spice-devel] [PATCH spice-gtk] Do not use deprecated GtkStock

2016-04-07 Thread Pavel Grunt
Use labels or named icons Deprecated since Gtk 3.10 --- src/spicy.c | 23 +++ src/usb-device-widget.c | 12 ++-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/spicy.c b/src/spicy.c index ca9db84..0475530 100644 --- a/src/spicy.c +++ b

Re: [Spice-devel] [PATCH spice-gtk v2 0/6] Cleanups for new gtk and glib

2016-04-07 Thread Pavel Grunt
On Wed, 2016-04-06 at 17:25 -0300, Eduardo Lima (Etrunko) wrote: > On 04/06/2016 10:40 AM, Pavel Grunt wrote: > > > > Hi, > > > > since we bumped the glib and gtk dependencies, it's possible to > > clean up > > the code little bit. Patches silence some deprecated warnings and > > change > > our c

Re: [Spice-devel] [PATCH 10/10] Move RedCharDeviceCallbacks into RedCharDeviceClass

2016-04-07 Thread Christophe Fergeau
On Fri, Apr 01, 2016 at 03:51:44PM -0500, Jonathon Jongsma wrote: > diff --git a/server/smartcard.c b/server/smartcard.c > index 52d56ea..0238efe 100644 > --- a/server/smartcard.c > +++ b/server/smartcard.c > @@ -272,14 +272,6 @@ static SpiceCharDeviceInstance > *smartcard_readers_get_unattached(v

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard

2016-04-07 Thread Takao Fujiwara
Please note the internal ImmDisableIME.patch needs to be disabled to get the WM_INPUTLANGCHANGE signal with mouse but no ImmDisableIME.patch causes a SEGV with Ctrl+Shift or Alt+Shift. On 04/06/16 15:42, Takao Fujiwara-san wrote: Zenkaku_Hankaku key has the different virtual-key codes between W