Re: [Spice-devel] [PATCH spice-gtk] widget: Fix rendering issues with CSD on Windows

2016-08-12 Thread Fabiano Fidêncio
On Fri, Aug 12, 2016 at 11:38 PM, Pavel Grunt wrote: > Replace GDK_WINDOW_HWND by gdk_win32_window_get_impl_hwnd() which gets > the HWND directly, without any side effects. > > Related: > https://bugzilla.redhat.com/show_bug.cgi?id=1352216 > --- > src/spice-widget.c | 2 +- > 1 file changed, 1 in

[Spice-devel] [PATCH spice-gtk] widget: Fix rendering issues with CSD on Windows

2016-08-12 Thread Pavel Grunt
Replace GDK_WINDOW_HWND by gdk_win32_window_get_impl_hwnd() which gets the HWND directly, without any side effects. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1352216 --- src/spice-widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice-widget.c b/src/spic

Re: [Spice-devel] [PATCH spice-gtk v2] Improve file transfer error messages

2016-08-12 Thread Jonathon Jongsma
Oops, I just noticed that Frediano apparently already pushed my old patch to git master. On Fri, 2016-08-12 at 14:49 -0500, Jonathon Jongsma wrote: > In preparation for potentially displaying error messages to a user in > a > UI, I thought I'd improve the messages slightly. Also translate them. >

[Spice-devel] [PATCH spice-gtk v2] Improve file transfer error messages

2016-08-12 Thread Jonathon Jongsma
In preparation for potentially displaying error messages to a user in a UI, I thought I'd improve the messages slightly. Also translate them. --- Changes since v1: - translate messages po/POTFILES.in | 1 + src/channel-main.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff

Re: [Spice-devel] [PATCH spice-gtk 2/2] Add ability to get sizes from SpiceFileTransferTask

2016-08-12 Thread Jonathon Jongsma
On Fri, 2016-08-12 at 15:28 +0200, Victor Toso wrote: > Hi, > > On Thu, Aug 11, 2016 at 01:14:51PM -0500, Jonathon Jongsma wrote: > > > > If a client is handling multiple SpiceFileTransferTasks at one > > time, > > it's not currently possible to provide a single overall progress to > > the > > us

Re: [Spice-devel] [PATCH spice-gtk 2/2] Add ability to get sizes from SpiceFileTransferTask

2016-08-12 Thread Jonathon Jongsma
On Fri, 2016-08-12 at 09:04 -0400, Frediano Ziglio wrote: > > > > > > If a client is handling multiple SpiceFileTransferTasks at one > > time, > > it's not currently possible to provide a single overall progress to > > the > > user. The only information that the client can get is the > > percenta

Re: [Spice-devel] [PATCH spice-gtk 1/2] Improve file transfer error messages

2016-08-12 Thread Jonathon Jongsma
On Fri, 2016-08-12 at 04:08 -0400, Frediano Ziglio wrote: > > > > > > In preparation for potentially displaying error messages to a user > > in a > > UI, I thought I'd improve the messages slightly. > > --- > >  src/channel-main.c | 4 ++-- > >  1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [Spice-devel] [vdagent-win v1] file-transfer: empty data message can be ignored

2016-08-12 Thread Victor Toso
Hi, On Wed, Aug 10, 2016 at 04:22:34PM +0200, Victor Toso wrote: > Based on bug solved for linux guest [0], client might send message > with 0 bytes. This situation might trigger a warning in the VDAgent as > it does not expect it; VDAgent will send > VD_AGENT_FILE_XFER_STATUS_ERROR which triggers

Re: [Spice-devel] [vdagent-win v3 2/2] vdagent-win: start vdagent with lock info from session

2016-08-12 Thread Frediano Ziglio
Would be something like this (not tested) diff --git a/common/vdcommon.h b/common/vdcommon.h index f4859e2..67fb034 100644 --- a/common/vdcommon.h +++ b/common/vdcommon.h @@ -35,6 +35,7 @@ typedef CRITICAL_SECTION mutex_t; #define VD_AGENT_REGISTRY_KEY "SOFTWARE\\Red Hat\\Spice\\vdagent\\" #d

Re: [Spice-devel] [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

2016-08-12 Thread Francois Gouget
On Fri, 12 Aug 2016, Frediano Ziglio wrote: > > > > On Fri, 12 Aug 2016, Frediano Ziglio wrote: > > > > > > > > > > If the user specifically requests access to the deprecated APIs by > > > > defining the SPICE_DEPRECATED macro, then turn off the > > > > SPICE_GNUC_DEPRECATED* warnings. > > > >

Re: [Spice-devel] [PATCH 1/5] Use proper delete for _events member

2016-08-12 Thread Victor Toso
Hi, On Fri, Aug 12, 2016 at 12:02:05PM +0100, Frediano Ziglio wrote: > Use delete[] to free an array. > This could potentially lead to memory errors depending > on compiler/library implementation. Acked-by: Victor Toso > > Signed-off-by: Frediano Ziglio > --- > vdservice/vdservice.cpp | 2 +- >

Re: [Spice-devel] [vdagent-win v3 2/2] vdagent-win: start vdagent with lock info from session

2016-08-12 Thread Victor Toso
Hi, On Fri, Aug 12, 2016 at 09:52:55AM -0400, Frediano Ziglio wrote: > > > > Commit 5907b6cbb5c724f9729da59a644271b4258d122e started to handle > > Lock/Unlock events from Session at VDAgent. Although that works just > > fine, it does not cover all the situations as pointed by Andrei at [0] > > an

Re: [Spice-devel] [vdagent-win v3 2/2] vdagent-win: start vdagent with lock info from session

2016-08-12 Thread Frediano Ziglio
> > Commit 5907b6cbb5c724f9729da59a644271b4258d122e started to handle > Lock/Unlock events from Session at VDAgent. Although that works just > fine, it does not cover all the situations as pointed by Andrei at [0] > and I quote: > > > It fails for next test-case: > > > > * Connect with RV to VM >

Re: [Spice-devel] [PATCH spice-gtk 2/2] Add ability to get sizes from SpiceFileTransferTask

2016-08-12 Thread Victor Toso
Hi, On Thu, Aug 11, 2016 at 01:14:51PM -0500, Jonathon Jongsma wrote: > If a client is handling multiple SpiceFileTransferTasks at one time, > it's not currently possible to provide a single overall progress to the > user. The only information that the client can get is the percentage > progress.

Re: [Spice-devel] [vdagent-win v3 1/2] vdagent: rework on event_dispatcher

2016-08-12 Thread Frediano Ziglio
> > As _stop_event is not mandatory, we are initializing the events array > with something that might be NULL. The problem is with the following > patch as I'm introducing a new non mandatory event and logic starts to > get a bit hard to follow. > > So this patch makes explicit if we are setting

[Spice-devel] [vdagent-win v3 2/2] vdagent-win: start vdagent with lock info from session

2016-08-12 Thread Victor Toso
Commit 5907b6cbb5c724f9729da59a644271b4258d122e started to handle Lock/Unlock events from Session at VDAgent. Although that works just fine, it does not cover all the situations as pointed by Andrei at [0] and I quote: > It fails for next test-case: > > * Connect with RV to VM > * Lock VM (ctrl-al

[Spice-devel] [vdagent-win v3 1/2] vdagent: rework on event_dispatcher

2016-08-12 Thread Victor Toso
As _stop_event is not mandatory, we are initializing the events array with something that might be NULL. The problem is with the following patch as I'm introducing a new non mandatory event and logic starts to get a bit hard to follow. So this patch makes explicit if we are setting or receiving a

Re: [Spice-devel] [PATCH spice-gtk 2/2] Add ability to get sizes from SpiceFileTransferTask

2016-08-12 Thread Frediano Ziglio
> > If a client is handling multiple SpiceFileTransferTasks at one time, > it's not currently possible to provide a single overall progress to the > user. The only information that the client can get is the percentage > progress. This patch adds two new properties: > - total-bytes: the size of th

Re: [Spice-devel] [client v3 4/4] streaming: Create the pipeline at the same time as the GStreamer decoder

2016-08-12 Thread Victor Toso
Hi, On Thu, Aug 11, 2016 at 12:22:24PM +0200, Francois Gouget wrote: > This lets create_gstreamer_decoder() fail if it cannot create the > pipeline it needs, allowing the caller to try fallbacks. > This also means the pipeline has the same lifetime as the decoder which > makes it possible to remov

Re: [Spice-devel] [client v3 3/4] streaming: Don't crash if the stream creation fails

2016-08-12 Thread Victor Toso
Hi, On Thu, Aug 11, 2016 at 12:22:08PM +0200, Francois Gouget wrote: > Note that this implies closing the stream before receiving any frame. > > Signed-off-by: Francois Gouget Acked-by: Victor Toso > --- > src/channel-display.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/sr

Re: [Spice-devel] [client v3 2/4] streaming: Don't crash if no frame was received before closing the stream

2016-08-12 Thread Victor Toso
Hi, On Thu, Aug 11, 2016 at 12:21:59PM +0200, Francois Gouget wrote: > Signed-off-by: Francois Gouget Acked-by: Victor Toso > --- > > This could potentially happen if we detect a stream right before it > ends. But it's mostly useful for the next patch. > > src/channel-display.c | 39 ++

[Spice-devel] [PATCH 4/5] Pass class pointer using thread parameter

2016-08-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/vdagent.cpp | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index bbf0989..9d0b5bd 100644 --- a/vdagent/vdagent.cpp +++ b/vdagent/vdagent.cpp @@ -246,16 +246,17 @@ VDAgent::~VDAgent()

[Spice-devel] [PATCH 3/5] Don't use _singleton if we already have the right this pointer

2016-08-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/vdagent.cpp | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index c67f30c..bbf0989 100644 --- a/vdagent/vdagent.cpp +++ b/vdagent/vdagent.cpp @@ -620,13 +620,12 @@ bool VDAgent::handle_

[Spice-devel] [PATCH 1/5] Use proper delete for _events member

2016-08-12 Thread Frediano Ziglio
Use delete[] to free an array. This could potentially lead to memory errors depending on compiler/library implementation. Signed-off-by: Frediano Ziglio --- vdservice/vdservice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.c

[Spice-devel] [PATCH 2/5] Pass class pointer using control context

2016-08-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdservice/vdservice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp index 12f7644..ef1ed9f 100644 --- a/vdservice/vdservice.cpp +++ b/vdservice/vdservice.cpp @@ -284,7 +284,7 @@ void V

[Spice-devel] [PATCH 5/5] Avoid to use _singleton for VDService

2016-08-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdservice/vdservice.cpp | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp index ef1ed9f..d2bedaa 100644 --- a/vdservice/vdservice.cpp +++ b/vdservice/vdservice.

Re: [Spice-devel] [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

2016-08-12 Thread Frediano Ziglio
> > On Fri, 12 Aug 2016, Frediano Ziglio wrote: > > > > > > > If the user specifically requests access to the deprecated APIs by > > > defining the SPICE_DEPRECATED macro, then turn off the > > > SPICE_GNUC_DEPRECATED* warnings. > > > Also automatically use G_GNUC_DEPRECATED if available. > > >

Re: [Spice-devel] [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

2016-08-12 Thread Francois Gouget
On Fri, 12 Aug 2016, Frediano Ziglio wrote: > > > > If the user specifically requests access to the deprecated APIs by > > defining the SPICE_DEPRECATED macro, then turn off the > > SPICE_GNUC_DEPRECATED* warnings. > > Also automatically use G_GNUC_DEPRECATED if available. > > Add SPICE_GNUC_DEPR

Re: [Spice-devel] [vdagent-win v1 2/2] vdagent: remove whitespaces

2016-08-12 Thread Frediano Ziglio
> --- > vdagent/display_setting.cpp | 10 +- > vdagent/display_setting.h | 2 +- > vdagent/file_xfer.cpp | 4 ++-- > vdagent/vdagent.cpp | 6 +++--- > 4 files changed, 11 insertions(+), 11 deletions(-) > > diff --git a/vdagent/display_setting.cpp b/vdagent/display_sett

Re: [Spice-devel] [spice 2/3] server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h

2016-08-12 Thread Francois Gouget
On Fri, 12 Aug 2016, Frediano Ziglio wrote: [...] > > +++ b/server/spice-server.h > > @@ -22,8 +22,7 @@ > > #error "Only spice.h can be included directly." > > #endif > > > > -#include > > - > > +#include > > #include "spice-core.h" > > spice-core.h already include so I would > avoid to ad

Re: [Spice-devel] [PATCH 2/2] OpenSSL from 1.1.0 is thread safe by default

2016-08-12 Thread Pavel Grunt
ack On Thu, 2016-08-11 at 14:22 +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- >  server/reds.c | 6 ++ >  1 file changed, 6 insertions(+) > > diff --git a/server/reds.c b/server/reds.c > index f74c8d3..c3780e0 100644 > --- a/server/reds.c > +++ b/server/reds.c > @@ -277

Re: [Spice-devel] [PATCH spice-gtk 1/2] Improve file transfer error messages

2016-08-12 Thread Frediano Ziglio
> > In preparation for potentially displaying error messages to a user in a > UI, I thought I'd improve the messages slightly. > --- > src/channel-main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/channel-main.c b/src/channel-main.c > index a074928..1ea0f71

Re: [Spice-devel] [PATCH spice-gtk] Fix docs for SpiceFileTransferTask::progress

2016-08-12 Thread Frediano Ziglio
> This property actually represents a fractional value from 0 to 1.0, not > a percentage between 0 and 100. > --- > src/spice-file-transfer-task.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/spice-file-transfer-task.c b/src/spice-file-transfer-task.c > index

Re: [Spice-devel] [PATCH 01/11] Move RedChannelClient to separate file

2016-08-12 Thread Frediano Ziglio
> > Reduce direct access to RedChannelClient, and get ready to convert to > GObject. This patch should be mechanical but I'm having some problems reviewing. I have to do some magic about new files, the diff is terrible, not clear if we miss some other patches in the meantime. The most scary thing

Re: [Spice-devel] [PATCH 10/11] Use CURSOR_CHANNEL_CLIENT() macro instead of RCC_TO_CCC()

2016-08-12 Thread Frediano Ziglio
> > Prepare for port to GObject I would merge this in 2/11 Frediano > --- > server/cursor-channel-client.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/server/cursor-channel-client.c b/server/cursor-channel-client.c > index cdb1e51..7f7383d 100644 > --- a/server

Re: [Spice-devel] [PATCH 09/11] Rename RCC_TO_DCC() to DISPLAY_CHANNEL_CLIENT()

2016-08-12 Thread Frediano Ziglio
> > Prepare for port to GObject I prefer the old macro name. RCC_TO_DCC suggest that you are converting a RedChannelClient to a DisplayChannelClient whle DISPLAY_CHANNEL_CLIENT suggests you are convert everything to DisplayChannelClient. I would then expect to see check for NULL pointer for eac

Re: [Spice-devel] [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

2016-08-12 Thread Frediano Ziglio
> > If the user specifically requests access to the deprecated APIs by > defining the SPICE_DEPRECATED macro, then turn off the > SPICE_GNUC_DEPRECATED* warnings. > Also automatically use G_GNUC_DEPRECATED if available. > Add SPICE_GNUC_DEPRECATED_FOR(). > I'm not really sure it's a good idea to

Re: [Spice-devel] [spice 2/3] server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h

2016-08-12 Thread Frediano Ziglio
> > spice-server.h cannot include glib.h because it is a public header and > is used by projects that do not use GLib. > > Signed-off-by: Francois Gouget > --- > server/spice-migration.h | 4 ++-- > server/spice-server.h| 13 ++--- > 2 files changed, 8 insertions(+), 9 deletions(-)