Re: [Spice-devel] [PATCH spice-gtk v3 1/4] gtk-session: use clear variable for array's size

2017-05-24 Thread Jonathon Jongsma
On Wed, 2017-05-24 at 18:54 +0200, Victor Toso wrote: > Hi, > > On Wed, May 24, 2017 at 11:36:55AM -0500, Jonathon Jongsma wrote: > > I see Frediano acked this, but there are a couple issues with the > > commit log if you haven't pushed yet. > > > > On Mon, 2017-05-22 at 20:08 +0200, Victor Toso

Re: [Spice-devel] [PATCH spice-gtk v3 1/4] gtk-session: use clear variable for array's size

2017-05-24 Thread Victor Toso
Hi, On Wed, May 24, 2017 at 11:36:55AM -0500, Jonathon Jongsma wrote: > I see Frediano acked this, but there are a couple issues with the > commit log if you haven't pushed yet. > > On Mon, 2017-05-22 at 20:08 +0200, Victor Toso wrote: > > From: Victor Toso > > > > By using 'num_types' variables,

Re: [Spice-devel] [PATCH spice-gtk v3 1/4] gtk-session: use clear variable for array's size

2017-05-24 Thread Jonathon Jongsma
I see Frediano acked this, but there are a couple issues with the commit log if you haven't pushed yet. On Mon, 2017-05-22 at 20:08 +0200, Victor Toso wrote: > From: Victor Toso > > By using 'num_types' variables, we have a clear variable with a clear > propose: It will track the number of VD_AG

[Spice-devel] [PATCH v2] Don't close all but one display during reboot.

2017-05-24 Thread Jonathon Jongsma
When a guest is rebooted, the QXL driver gets unloaded at some point in the reboot process. When the driver is unloaded, the spice server sets a single flag to FALSE: RedWorker::driver_cap_monitors_config. This flag indicates whether the driver is capable of sending its own monitors config messages

[Spice-devel] [PATCH spice-vdagent_win] file-xfer: Add support for reporting on free space

2017-05-24 Thread Jakub Janků
Add function create_status_message() that allocates new VDAgentFileXferStatusMessage with optional error data. If an error occurs in function handle_start(), or handle_data(), create appropriate status message - in case of lack of free space, send message with VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_

[Spice-devel] [PATCH spice-vdagent v6 2/2] file-xfer: change error log messages

2017-05-24 Thread Jakub Janků
Add prefix "file-xfer #id" prefix to log message in send_file_xfer_status(), so the message doesn't have to include file-xfer task id and it's always clear, what task is the message concerning. --- src/vdagentd/vdagentd.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[Spice-devel] [PATCH spice-vdagent v6 1/2] file-xfer: Check free space before file transfer

2017-05-24 Thread Jakub Janků
Add function get_free_space_available that retrieves amount of free space in the given directory. The statvfs may fail even when there's enough free space (e.g. when not supported by system), in this case return G_MAXUINT64 so that the transfer isn't terminated groundlessly. When the file is too b

[Spice-devel] [PATCH spice-vdagent v5 2/2] file-xfer: change error log messages

2017-05-24 Thread Jakub Janků
Add prefix "file-xfer #id" prefix to log message in send_file_xfer_status(), so the message doesn't have to include file-xfer task id and it's always clear, what task is the message concerning. --- src/vdagentd/vdagentd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/

[Spice-devel] [PATCH spice-vdagent v5 1/2] file-xfer: Check free space before file transfer

2017-05-24 Thread Jakub Janků
Add function get_free_space_available that retrieves amount of free space in the given directory. The statvfs may fail even when there's enough free space (e.g. when not supported by system), in this case return G_MAXUINT64 so that the transfer isn't terminated groundlessly. When the file is too b

[Spice-devel] [spice-gtk 5/4] gtk-session: move var declaration to the top

2017-05-24 Thread Victor Toso
From: Victor Toso Most of spice-gtk code tries to follow that. Doing this specifically to the clipboard_get_targets() due to the recent previous changes in this function. This patch also takes the opportunity to remove the array initialization of types[] which is not needed since 1b73ae3cf25bd4

Re: [Spice-devel] [PATCH spice-gtk v3 1/4] gtk-session: use clear variable for array's size

2017-05-24 Thread Victor Toso
Hi, On Wed, May 24, 2017 at 05:05:47AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > By using 'num_types' variables, we have a clear variable with a clear > > propose: It will track the number of VD_AGENT_CLIPBOARD types we are > > storing in types[] array. > > > > This new v

[Spice-devel] [PATCH spice-html5] Display: Implement change preferred compression message

2017-05-24 Thread Tomáš Bohdálek
--- display.js | 9 + enums.js| 1 + spicemsg.js | 20 3 files changed, 30 insertions(+) diff --git a/display.js b/display.js index 7719b23..501ef03 100644 --- a/display.js +++ b/display.js @@ -1245,3 +1245,12 @@ function listen_for_video_events(stream) if

Re: [Spice-devel] [PATCH vd_agent_win] Use sprintf_s instead of sprintf to not crash

2017-05-24 Thread Frediano Ziglio
> > > > > > > > > On Tue, 2017-05-23 at 07:01 -0400, Frediano Ziglio wrote: > > > > > > > > > > On Wed, May 17, 2017 at 12:57:34PM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > > > vdagent/file_xfer.cpp | 4 ++-- > > > > > > > > 1 file changed, 2

Re: [Spice-devel] [PATCH vd_agent_win] Use sprintf_s instead of sprintf to not crash

2017-05-24 Thread Frediano Ziglio
> > > > > > > > > On Tue, 2017-05-23 at 07:01 -0400, Frediano Ziglio wrote: > > > > > > > > > > On Wed, May 17, 2017 at 12:57:34PM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > > > vdagent/file_xfer.cpp | 4 ++-- > > > > > > > > 1 file changed, 2

Re: [Spice-devel] [PATCH spice-gtk v3 2/4] gtk-session: do an early check of clipboard grab

2017-05-24 Thread Frediano Ziglio
> > From: Victor Toso > > As we will not be doing anything in case clipboard is already grabbed > > Signed-off-by: Victor Toso > Signed-off-by: Victor Toso > --- > src/spice-gtk-session.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/src/spice-

Re: [Spice-devel] [PATCH spice-gtk v3 1/4] gtk-session: use clear variable for array's size

2017-05-24 Thread Frediano Ziglio
> > From: Victor Toso > > By using 'num_types' variables, we have a clear variable with a clear > propose: It will track the number of VD_AGENT_CLIPBOARD types we are > storing in types[] array. > > This new variable helps: > - removing one for that was counting the number stored types; > - red

Re: [Spice-devel] [PATCH v2 2/2] Avoid clang warnings on casts with stricter alignment requirements

2017-05-24 Thread Christophe de Dinechin
> On 24 May 2017, at 10:46, Christophe Fergeau wrote: > > On Tue, May 23, 2017 at 07:05:18PM +0200, Christophe de Dinechin wrote: >>> , another alternative would be to have a --enable-alignment-debug, >> >> I tried that, but the problem is to keep that consistent between >> spice-common and spi

Re: [Spice-devel] [PATCH v2 2/2] Avoid clang warnings on casts with stricter alignment requirements

2017-05-24 Thread Christophe Fergeau
On Tue, May 23, 2017 at 07:05:18PM +0200, Christophe de Dinechin wrote: > > , another alternative would be to have a --enable-alignment-debug, > > I tried that, but the problem is to keep that consistent between > spice-common and spice-gdk (they may have different configuration). Do > you have a

Re: [Spice-devel] [PATCH v2 2/2] Avoid clang warnings on casts with stricter alignment requirements

2017-05-24 Thread Christophe de Dinechin
> On 24 May 2017, at 10:09, Christophe Fergeau wrote: > > On Tue, May 23, 2017 at 12:55:13PM +0200, Victor Toso wrote: >>> >>> I only see -DNDEBUG being defined for cmake builds in rpm --showrc, and >>> none of my 250 spec files have a -DNDEBUG in them, so I would not expect >>> this to be set.

Re: [Spice-devel] [PATCH v2 2/2] Avoid clang warnings on casts with stricter alignment requirements

2017-05-24 Thread Christophe Fergeau
On Tue, May 23, 2017 at 12:55:13PM +0200, Victor Toso wrote: > > > > I only see -DNDEBUG being defined for cmake builds in rpm --showrc, and > > none of my 250 spec files have a -DNDEBUG in them, so I would not expect > > this to be set. I think we have SPICE_DEBUG already which might make > > sens

Re: [Spice-devel] [PATCH spice-vdagent v4] file-xfer: Check free space before file transfer

2017-05-24 Thread Christophe Fergeau
Hey, On Wed, May 24, 2017 at 08:38:53AM +0200, Pavel Grunt wrote: > On Sun, 2017-05-21 at 15:19 +0200, Jakub Janků wrote: > > Add function get_free_space_available that retrieves amount of free > > space in the given directory. The statvfs may fail even when there's > > enough free space (e.g. whe

Re: [Spice-devel] [PATCH spice-gtk v2 3/3] widget: Set cursor during construction

2017-05-24 Thread Victor Toso
On Tue, May 23, 2017 at 04:56:26PM +0200, Pavel Grunt wrote: > In a multimonitor environment can easily happen that a cursor is set > before some of the SpiceDisplays are created. IOW the first created > SpiceDisplay has the cursor but others don't. > > To avoid the issue set the initial cursor us

Re: [Spice-devel] [PATCH spice-gtk v2 2/3] Deprecate "cursor-set" signal

2017-05-24 Thread Victor Toso
Hi, On Tue, May 23, 2017 at 04:56:25PM +0200, Pavel Grunt wrote: > Use cursor notify instead > > Related: > https://bugzilla.redhat.com/show_bug.cgi?id=1411380 > --- > src/channel-cursor.c | 4 +++- > src/spice-widget.c | 31 +-- > 2 files changed, 20 insertions(+)

Re: [Spice-devel] [PATCH spice-gtk v2 1/3] cursor: Add cursor shape property

2017-05-24 Thread Victor Toso
On Tue, May 23, 2017 at 04:56:24PM +0200, Pavel Grunt wrote: > It provides information about the remote cursor similar to the signal > "cursor-set". The benefit over the signal is that the property can be > queried at any time. > > Users of the "cursor-set" signal should migrate to "notify::cursor"