[Spice-devel] [spice-gtk v4] gtk-session: always reply to agent's clipboard request

2017-02-24 Thread Victor Toso
From: Victor Toso This fixes a regression from 7b0de6217670e0f668aff2949f We need to reply back to the agent all clipboard requests even in case of failure otherwise it will have a pending request. The following error message can be seen afterwards, in the linux agent, when client sends down som

Re: [Spice-devel] GStreamer's zero-copy code is broken

2017-02-24 Thread Francois Gouget
On Fri, 24 Feb 2017, Christophe de Dinechin wrote: [...] > Looking at the patch, I wonder why we pass an offset and a stride from > different sources (offset is from the source, but stride is from the > bitmap)? Shouldn’t we use the stream stride? I think that's correct: * bitmap->{x,y} are the

Re: [Spice-devel] [spice-gtk v3] gtk-session: always reply to agent's clipboard request

2017-02-24 Thread Victor Toso
Hi, On Fri, Feb 24, 2017 at 03:39:16PM +0100, Pavel Grunt wrote: > Hi, > > On Fri, 2017-02-24 at 14:28 +0100, Victor Toso wrote: > > From: Victor Toso > > > > This fixes a regression from 7b0de6217670e0f668aff2949f > > > > We need to reply back to the agent all clipboard requests even in > > c

Re: [Spice-devel] [PATCH spice-gtk] main: Avoid sqrt in monitor compare

2017-02-24 Thread Frediano Ziglio
> > > On 24 Feb 2017, at 13:26, Pavel Grunt wrote: > > > > qsort cares about the sign of the difference and that should stay > > the same > > --- > > src/channel-main.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/src/channel-main.c b/src/channel-main.c > >

Re: [Spice-devel] [spice-gtk v3] gtk-session: always reply to agent's clipboard request

2017-02-24 Thread Pavel Grunt
Hi, On Fri, 2017-02-24 at 14:28 +0100, Victor Toso wrote: > From: Victor Toso > > This fixes a regression from 7b0de6217670e0f668aff2949f > > We need to reply back to the agent all clipboard requests even in > case > of failure otherwise it will have a pending request. The following > error mes

Re: [Spice-devel] GStreamer's zero-copy code is broken

2017-02-24 Thread Francois Gouget
> > Maybe it's a gstreamer bug? Here I'm using 1.10.2. > > Does not happen to me. > Which versions are you using (gstreamer, os, spice, etc) ? I use the GStreamer version mentionned above. Spice is anything after commit c3d23707. The client is spicy, either 0.33 from my distribution or built fr

Re: [Spice-devel] [spice-gtk v2] gtk-session: check if retrieving clipboard data failed

2017-02-24 Thread Pavel Grunt
On Fri, 2017-02-24 at 10:19 +0100, Victor Toso wrote: > From: Victor Toso > > In case of failure, the GdkAtom *atoms will be set to NULL. > Including this check to an early return. > > Signed-off-by: Victor Toso Acked-by: Pavel Grunt > --- >  src/spice-gtk-session.c | 5 + >  1 file changed

Re: [Spice-devel] [spice-gtk v2 5/7] gtk-session: move atom's debug

2017-02-24 Thread Pavel Grunt
On Fri, 2017-02-24 at 14:44 +0100, Victor Toso wrote: > From: Victor Toso > > We already iterate in all n_atoms and get its name with > gdk_atom_name(), let's move the debug there too; > > While at it, move the generic SPICE_DEBUG of the function to the > top. > It should help us identify when t

Re: [Spice-devel] GStreamer's zero-copy code is broken

2017-02-24 Thread Christophe de Dinechin
> On 24 Feb 2017, at 11:58, Francois Gouget wrote: > > > The patch below breaks the zero-copy code in the GStreamer video > encoder: > > commit c3d237075b994fe67e58f2b3164cb579e6f4 > Author: Frediano Ziglio > Date: Mon Dec 12 17:22:50 2016 + > >gstreamer: Avoid memory copy if

[Spice-devel] [spice-gtk v2 7/7] gtk-session: move variables to internal scope

2017-02-24 Thread Victor Toso
From: Victor Toso Signed-off-by: Victor Toso --- src/spice-gtk-session.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c index c7702c6..8324974 100644 --- a/src/spice-gtk-session.c +++ b/src/spice-gtk-session.c @@ -61

[Spice-devel] [spice-gtk v2 5/7] gtk-session: move atom's debug

2017-02-24 Thread Victor Toso
From: Victor Toso We already iterate in all n_atoms and get its name with gdk_atom_name(), let's move the debug there too; While at it, move the generic SPICE_DEBUG of the function to the top. It should help us identify when the function was triggered but not used due the early returns. Signed-

Re: [Spice-devel] [PATCH spice-gtk] main: Avoid sqrt in monitor compare

2017-02-24 Thread Christophe de Dinechin
> On 24 Feb 2017, at 13:26, Pavel Grunt wrote: > > qsort cares about the sign of the difference and that should stay > the same > --- > src/channel-main.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/channel-main.c b/src/channel-main.c > index cd3dee7..50c29f

Re: [Spice-devel] GStreamer's zero-copy code is broken

2017-02-24 Thread Frediano Ziglio
> > The patch below breaks the zero-copy code in the GStreamer video > encoder: > > commit c3d237075b994fe67e58f2b3164cb579e6f4 > Author: Frediano Ziglio > Date: Mon Dec 12 17:22:50 2016 + > > gstreamer: Avoid memory copy if strides are different > > If bitmap stride and

[Spice-devel] [spice-gtk v3] gtk-session: always reply to agent's clipboard request

2017-02-24 Thread Victor Toso
From: Victor Toso This fixes a regression from 7b0de6217670e0f668aff2949f We need to reply back to the agent all clipboard requests even in case of failure otherwise it will have a pending request. The following error message can be seen afterwards, in the linux agent, when client sends down som

Re: [Spice-devel] [PATCH spice-gtk] main: Avoid sqrt in monitor compare

2017-02-24 Thread Frediano Ziglio
> > qsort cares about the sign of the difference and that should stay > the same > --- > src/channel-main.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/channel-main.c b/src/channel-main.c > index cd3dee7..50c29f2 100644 > --- a/src/channel-main.c > +++ b/src

Re: [Spice-devel] GStreamer's zero-copy code is broken

2017-02-24 Thread Frediano Ziglio
> > > The patch below breaks the zero-copy code in the GStreamer video > encoder: > > commit c3d237075b994fe67e58f2b3164cb579e6f4 > Author: Frediano Ziglio > Date: Mon Dec 12 17:22:50 2016 + > > gstreamer: Avoid memory copy if strides are different > > If bitmap stride a

[Spice-devel] [PATCH spice-gtk] main: Avoid sqrt in monitor compare

2017-02-24 Thread Pavel Grunt
qsort cares about the sign of the difference and that should stay the same --- src/channel-main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/channel-main.c b/src/channel-main.c index cd3dee7..50c29f2 100644 --- a/src/channel-main.c +++ b/src/channel-main.c @@ -17,

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Victor Toso
Hi, On Fri, Feb 24, 2017 at 12:13:21PM +0100, Christophe de Dinechin wrote: > > > On 22 Feb 2017, at 13:29, Victor Toso wrote: > > > > From: Victor Toso > > > > We need to reply back to the agent all clipboard requests even in case > > of failure otherwise it will have a pending request. The fol

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Victor Toso
Hi, On Fri, Feb 24, 2017 at 12:36:56PM +0100, Pavel Grunt wrote: > On Fri, 2017-02-24 at 11:26 +0100, Victor Toso wrote: > > > > > > >  conv = fixup_clipboard_text(self, text, &len); > > > > > > >  if (!check_clipboard_size_limits(self, len)) { > > > > > > > -g_free(conv); > > > >

Re: [Spice-devel] [spice-gtk v1 1/7] gtk-session: check if retrieving clipboard data failed

2017-02-24 Thread Pavel Grunt
On Thu, 2017-02-23 at 16:05 +0100, Victor Toso wrote: > Hi, > > On Thu, Feb 23, 2017 at 02:01:56PM +0100, Pavel Grunt wrote: > > On Wed, 2017-02-22 at 14:11 +0100, Victor Toso wrote: > > > From: Victor Toso > > > > > > In case of failure, > > > > Do we want to know about the failure? > > Not s

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Pavel Grunt
On Fri, 2017-02-24 at 11:26 +0100, Victor Toso wrote: > Hi, > > On Fri, Feb 24, 2017 at 11:04:38AM +0100, Pavel Grunt wrote: > > > > > > +selection = get_selection_from_clipboard(self->priv, > > > > > > clipboard); > > > > > > +g_return_if_fail(selection != -1); > > > > > > > > so is it n

[Spice-devel] [client] spicy-stats: spicy-stats uses libgobject so link with it

2017-02-24 Thread Francois Gouget
This avoids having the linker complain that g_signal_connect_data() or some other GObject API is undefined. Signed-off-by: Francois Gouget --- tools/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Makefile.am b/tools/Makefile.am index e41e0ab5..c80d34ae 100644 --- a/tools/M

[Spice-devel] [client] spicy: Spicy uses GTK+ and must link with it

2017-02-24 Thread Francois Gouget
This avoids having the linker complain that gtk_toggle_action_get_type() or some other GTK+ API is undefined. Signed-off-by: Francois Gouget --- tools/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Makefile.am b/tools/Makefile.am index 0bdb3c54..e41e0ab5 100644 --- a/tools

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Christophe de Dinechin
> On 22 Feb 2017, at 13:29, Victor Toso wrote: > > From: Victor Toso > > We need to reply back to the agent all clipboard requests even in case > of failure otherwise it will have a pending request. The following > error message can be seen in afterwards, when client sends down some > clipboar

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Victor Toso
Hi, On Fri, Feb 24, 2017 at 11:04:38AM +0100, Pavel Grunt wrote: > > > > > +selection = get_selection_from_clipboard(self->priv, > > > > > clipboard); > > > > > +g_return_if_fail(selection != -1); > > > > > > so is it not needed to notify here as well ? > > > > We can't without knowing the

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Pavel Grunt
On Fri, 2017-02-24 at 10:49 +0100, Victor Toso wrote: > Hi, > > On Fri, Feb 24, 2017 at 10:25:43AM +0100, Pavel Grunt wrote: > > Hi, > > > > On Fri, 2017-02-24 at 10:07 +0100, Victor Toso wrote: > > > Hi, > > > > > > On Wed, Feb 22, 2017 at 01:29:20PM +0100, Victor Toso wrote: > > > > Maybe "gt

[Spice-devel] [spice-gtk v2] gtk-session: always reply to agent's clipboard request

2017-02-24 Thread Victor Toso
From: Victor Toso This fixes a regression from 7b0de6217670e0f668aff2949f We need to reply back to the agent all clipboard requests even in case of failure otherwise it will have a pending request. The following error message can be seen afterwards, in the linux agent, when client sends down som

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Victor Toso
Hi, On Fri, Feb 24, 2017 at 10:25:43AM +0100, Pavel Grunt wrote: > Hi, > > On Fri, 2017-02-24 at 10:07 +0100, Victor Toso wrote: > > Hi, > > > > On Wed, Feb 22, 2017 at 01:29:20PM +0100, Victor Toso wrote: > Maybe "gtk-session: Always reply to agent's clipboard request" fits > better Ok, fixed lo

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Pavel Grunt
Hi, On Fri, 2017-02-24 at 10:07 +0100, Victor Toso wrote: > Hi, > > On Wed, Feb 22, 2017 at 01:29:20PM +0100, Victor Toso wrote: Maybe "gtk-session: Always reply to agent's clipboard request" fits better > > From: Victor Toso > > > > We need to reply back to the agent all clipboard requests ev

[Spice-devel] [spice-gtk v2] gtk-session: check if retrieving clipboard data failed

2017-02-24 Thread Victor Toso
From: Victor Toso In case of failure, the GdkAtom *atoms will be set to NULL. Including this check to an early return. Signed-off-by: Victor Toso --- src/spice-gtk-session.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c index 0426d8f

Re: [Spice-devel] [spice-gtk v1] gtk-session: reply agent's clipboard request on failure

2017-02-24 Thread Victor Toso
Hi, On Wed, Feb 22, 2017 at 01:29:20PM +0100, Victor Toso wrote: > From: Victor Toso > > We need to reply back to the agent all clipboard requests even in case > of failure otherwise it will have a pending request. The following > error message can be seen in afterwards, when client sends down so