Re: [Spice-devel] [PATCH spice-gtk v2 8/8] widget: modify update-area to not require primary surface

2016-03-23 Thread Pavel Grunt
On Wed, 2016-03-23 at 19:32 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > Hi, > > > > as we discussed, I prefer this patch to go in after 9/8 to avoid > > some > > incorrect resizes > Ok > > > > > > > On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote:

Re: [Spice-devel] [PATCH spice-gtk v2 4/8] display: return NULL in spice_display_get_gl_scanout()

2016-03-23 Thread Marc-André Lureau
Hi - Original Message - > Hi Marc-André, > > On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > > If there is no valid scanout, return NULL. > > When / how it can happen ? Looking at gl_scanout() there is g_return if > scanout == NULL, if NULL is a valid/expected return value

Re: [Spice-devel] [PATCH spice-gtk v2 6/8] egl: check and update scanout after egl init

2016-03-23 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > > Once the egl/GL context are initialized, check if there is a scanout > > to > > associate to display widget. This solves races when scanout update is > > happening before the egl/GL context i

Re: [Spice-devel] [PATCH spice-gtk v2 8/8] widget: modify update-area to not require primary surface

2016-03-23 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > as we discussed, I prefer this patch to go in after 9/8 to avoid some > incorrect resizes Ok > > On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > > If egl display is enabled, use GL scanout geometry to check > > intersection > > with the m

Re: [Spice-devel] [PATCH spice-gtk v2 9/8] main: don't update display timer for unchanged config

2016-03-23 Thread Jonathon Jongsma
Yeah, as I mentioned in an email just a few minutes ago, I do still have the same concern, but it's a minor one and arguably a very rare corner case. So probably it shouldn't hold up this patch. On Wed, 2016-03-23 at 20:39 +0100, Pavel Grunt wrote: > Hi, > > So the timer is the main problem ? >

Re: [Spice-devel] [PATCH spice-gtk v2 6/8] egl: check and update scanout after egl init

2016-03-23 Thread Pavel Grunt
Hi, On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > Once the egl/GL context are initialized, check if there is a scanout > to > associate to display widget. This solves races when scanout update is > happening before the egl/GL context is ready. > Is it common that the display chann

Re: [Spice-devel] [PATCH spice-gtk v2 2/8] egl: check context is ready

2016-03-23 Thread Pavel Grunt
Acked-by: Pavel Grunt On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > Add a new GL status field to check if the GL context is ready. This > helps debugging races where GL is called before the context is ready. > > Signed-off-by: Marc-André Lureau > --- >  src/spice-widget-egl.c  |

Re: [Spice-devel] [PATCH spice-gtk v2 7/8] widget: update d->ready based on scanout image available

2016-03-23 Thread Pavel Grunt
Acked-by: Pavel Grunt On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > d->ready is updated based on monitor area & canvas. In case of GL > rendering, update it based on monitor area & scanout and add check > before drawing update. > > Signed-off-by: Marc-André Lureau > --- >  src/s

Re: [Spice-devel] [PATCH spice-gtk v2 3/8] widget: enable egl before updating scanout

2016-03-23 Thread Pavel Grunt
Acked-by: Pavel Grunt On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > The GLArea is realized lazily, when it is made visible in > set_egl_enabled(). The egl context is initialized once the GLArea is > realized. Enable egl before updating the scanout. > > Signed-off-by: Marc-André L

Re: [Spice-devel] [PATCH spice-gtk v2 5/8] widget: make gl-scanout and update-monitor-area privately exported

2016-03-23 Thread Pavel Grunt
Acked-by: Pavel Grunt On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > The following changes will call these functions from spice-widget- > egl.c > > Signed-off-by: Marc-André Lureau > --- >  src/spice-widget-priv.h |  3 +++ >  src/spice-widget.c  | 17 +++-- >  2 fi

Re: [Spice-devel] [PATCH spice-gtk v2 9/8] main: don't update display timer for unchanged config

2016-03-23 Thread Pavel Grunt
Hi, So the timer is the main problem ? It also solves/avoids problems with a guest running on wayland when the "resize-guest" property is TRUE. See bug https://bugzilla.redhat.com/show_bug.cgi?id=1266484  It avoids destroying the primary surface when the display configuration has not changed I w

Re: [Spice-devel] [PATCH spice-gtk v2 4/8] display: return NULL in spice_display_get_gl_scanout()

2016-03-23 Thread Pavel Grunt
Hi Marc-André, On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > If there is no valid scanout, return NULL. When / how it can happen ? Looking at gl_scanout() there is g_return if scanout == NULL, if NULL is a valid/expected return value then that g_return should be changed. Pavel >

Re: [Spice-devel] [PATCH spice-gtk v2 8/8] widget: modify update-area to not require primary surface

2016-03-23 Thread Pavel Grunt
Hi, as we discussed, I prefer this patch to go in after 9/8 to avoid some incorrect resizes On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > If egl display is enabled, use GL scanout geometry to check > intersection > with the monitor area. This solves displaying GL display without >

Re: [Spice-devel] [PATCH spice-gtk v2 1/8] widget: remove superflous WIN32 check

2016-03-23 Thread Pavel Grunt
Acked-by: Pavel Grunt On Tue, 2016-03-22 at 13:57 +0100, Marc-André Lureau wrote: > The egl call is already inside a X11 conditional block. > > Signed-off-by: Marc-André Lureau > --- >  src/spice-widget.c | 2 -- >  1 file changed, 2 deletions(-) > > diff --git a/src/spice-widget.c b/src/spice-

Re: [Spice-devel] [PATCH spice-gtk v2 9/8] main: don't update display timer for unchanged config

2016-03-23 Thread Jonathon Jongsma
On Wed, 2016-03-23 at 18:02 +0100, Marc-André Lureau wrote: > With virgl, set_monitor_ready() may be called each time the scanout is > updated to set the monitor area. This will call > spice_main_update_display(), and keep the timer postponed even if the > monitor configuration didn't change. Treat

[Spice-devel] [PATCH spice-gtk v2 9/8] main: don't update display timer for unchanged config

2016-03-23 Thread Marc-André Lureau
With virgl, set_monitor_ready() may be called each time the scanout is updated to set the monitor area. This will call spice_main_update_display(), and keep the timer postponed even if the monitor configuration didn't change. Treat unchanged configuration has a no-op and keep configuration timer un

Re: [Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-23 Thread Pavel Grunt
On Wed, 2016-03-23 at 17:45 +0100, Christophe Fergeau wrote: > On Wed, Mar 23, 2016 at 05:36:04PM +0100, Pavel Grunt wrote: > > > > Hi Christophe, > > > > On Wed, 2016-03-23 at 17:18 +0100, Christophe Fergeau wrote: > > > > > > On Mon, Mar 21, 2016 at 03:28:41PM +0100, Christophe Fergeau > > > w

Re: [Spice-devel] [PATCH 02/13] Free dispatchers at exit

2016-03-23 Thread Frediano Ziglio
> > On Wed, Mar 23, 2016 at 12:48:28PM +, Frediano Ziglio wrote: > > From: Jonathon Jongsma > > > > --- > > server/red-qxl.c | 7 +++ > > server/red-qxl.h | 1 + > > server/reds.c| 2 ++ > > 3 files changed, 10 insertions(+) > > > > diff --git a/server/red-qxl.c b/server/red-qxl.c

Re: [Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 05:36:04PM +0100, Pavel Grunt wrote: > Hi Christophe, > > On Wed, 2016-03-23 at 17:18 +0100, Christophe Fergeau wrote: > > On Mon, Mar 21, 2016 at 03:28:41PM +0100, Christophe Fergeau wrote: > > > > > > On Mon, Mar 21, 2016 at 02:57:18PM +0100, Pavel Grunt wrote: > > > >

Re: [Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-23 Thread Pavel Grunt
Hi Christophe, On Wed, 2016-03-23 at 17:18 +0100, Christophe Fergeau wrote: > On Mon, Mar 21, 2016 at 03:28:41PM +0100, Christophe Fergeau wrote: > > > > On Mon, Mar 21, 2016 at 02:57:18PM +0100, Pavel Grunt wrote: > > > > > > Thanks! > > > > > > Acked-by: Pavel Grunt > > > > > > On Fri, 2016

Re: [Spice-devel] [PATCH 02/13] Free dispatchers at exit

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 12:48:28PM +, Frediano Ziglio wrote: > From: Jonathon Jongsma > > --- > server/red-qxl.c | 7 +++ > server/red-qxl.h | 1 + > server/reds.c| 2 ++ > 3 files changed, 10 insertions(+) > > diff --git a/server/red-qxl.c b/server/red-qxl.c > index 8012b26..5233af

Re: [Spice-devel] [spice-server] doc: Add virgl documentation

2016-03-23 Thread Christophe Fergeau
On Mon, Mar 21, 2016 at 03:28:41PM +0100, Christophe Fergeau wrote: > On Mon, Mar 21, 2016 at 02:57:18PM +0100, Pavel Grunt wrote: > > Thanks! > > > > Acked-by: Pavel Grunt > > > > On Fri, 2016-03-18 at 17:12 +0100, Christophe Fergeau wrote: > > > +GL acceleration (virgl) > > > +

Re: [Spice-devel] [PATCH spice-gtk] spicy: Remove configure-event callback

2016-03-23 Thread Marc-André Lureau
ack - Original Message - > It is a leftover - see "Remove GnomeRR code" > commit 30986505ba6041c293c38cb4b7f4b618a59f4716 > --- > src/spicy.c | 18 -- > 1 file changed, 18 deletions(-) > > diff --git a/src/spicy.c b/src/spicy.c > index 6ca014b..ca9db84 100644 > --- a/src/

Re: [Spice-devel] [PATCH spice-gtk] spicy: Remove configure-event callback

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 05:06:21PM +0100, Pavel Grunt wrote: > It is a leftover - see "Remove GnomeRR code" > commit 30986505ba6041c293c38cb4b7f4b618a59f4716 Ah ok it's no longer doing anything useful after this commit. Acked-by: Christophe Fergeau > --- > src/spicy.c | 18 -- >

[Spice-devel] [PATCH spice-gtk] spicy: Remove configure-event callback

2016-03-23 Thread Pavel Grunt
It is a leftover - see "Remove GnomeRR code" commit 30986505ba6041c293c38cb4b7f4b618a59f4716 --- src/spicy.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/src/spicy.c b/src/spicy.c index 6ca014b..ca9db84 100644 --- a/src/spicy.c +++ b/src/spicy.c @@ -878,23 +878,6 @@ stati

Re: [Spice-devel] 答复: remote-viewer usb redirection

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 03:58:01AM +0100, Fabiano Fidêncio wrote: > Please, > > On Wed, Mar 23, 2016 at 3:08 AM, lichanghua wrote: > > Maybe it is, but I try to recompile the spice-gtk and virt-viewer, I can't > > get correct result, Do anyone have the remote-viewer version supported > > USB_re

Re: [Spice-devel] [spice-gtk v2] Avoid to access array with negative numbers

2016-03-23 Thread Pavel Grunt
On Wed, 2016-03-23 at 15:40 +, Frediano Ziglio wrote: Acked-by: Pavel Grunt > --- >  src/spice-widget.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > Changes from v1: > - make parameter guint as GdkEventButton::button is guint. > > diff --git a/src/spice-widget.c b/src/spice-

[Spice-devel] [spice-gtk v2] Avoid to access array with negative numbers

2016-03-23 Thread Frediano Ziglio
--- src/spice-widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changes from v1: - make parameter guint as GdkEventButton::button is guint. diff --git a/src/spice-widget.c b/src/spice-widget.c index 19753e7..b1a9423 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -1539,7

Re: [Spice-devel] [PATCH] use constructor/destructor macros

2016-03-23 Thread Pavel Grunt
On Wed, 2016-03-23 at 15:23 +, Frediano Ziglio wrote: > Initialize global images at load time: > - make sure these stuff are initialized without using runtime > resources; > - make sure stuff are initialize really earlier. > Do not use atexit function but a destructor. > > Signed-off-by: Fredi

Re: [Spice-devel] [spice-gtk] Avoid to access array with negative numbers

2016-03-23 Thread Pavel Grunt
Hi, according to GdkEventButton documentation [0] the 'button' is guint so the button_gdk_to_spice() should take guint instead of int. Pavel [0] https://developer.gnome.org/gdk3/stable/gdk3-Event-Structures.html# GdkEventButton On Wed, 2016-03-23 at 15:28 +, Frediano Ziglio wrote: > --- >  

[Spice-devel] [spice-gtk] Avoid to access array with negative numbers

2016-03-23 Thread Frediano Ziglio
--- src/spice-widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice-widget.c b/src/spice-widget.c index 19753e7..d2fd789 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -1549,7 +1549,7 @@ static int button_gdk_to_spice(int gdk) [ 5 ] = SPICE_MO

[Spice-devel] [PATCH] use constructor/destructor macros

2016-03-23 Thread Frediano Ziglio
Initialize global images at load time: - make sure these stuff are initialized without using runtime resources; - make sure stuff are initialize really earlier. Do not use atexit function but a destructor. Signed-off-by: Frediano Ziglio --- server/red-qxl.c | 7 --- server/reds.c| 7 +---

Re: [Spice-devel] [PATCH 2/2] use macro to define constructor function

2016-03-23 Thread Pavel Grunt
On Mon, 2016-02-29 at 10:36 +, Frediano Ziglio wrote: > Avoid having to call function at runtime to inialize static. > Old functions are defined as deprecated for compatibility. > > Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt > --- >  common/gdi_canvas.c |  2 -- >  common/gl_canvas.

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-03-23 Thread Eduardo Lima (Etrunko)
On 23/03/16 09:04, Fabiano Fidêncio wrote: > gtask-helper provide methods that can easily be used for returning in > idle, as a few issues have been found in the GTask code used in > spice-gtk due to a immediately return when a return in idle was > expected. As examples of these issues, you can tak

[Spice-devel] [PATCH] qxl: use Dispatcher in channel callbacks

2016-03-23 Thread Frediano Ziglio
There is no need callbacks knows about internal QXLState. Signed-off-by: Frediano Ziglio --- server/red-qxl.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index 3fd5c12..1759f38 100644 --- a/serve

Re: [Spice-devel] [PATCH] channel-main: fix leak on volume-sync

2016-03-23 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Mar 23, 2016 at 03:42:30PM +0100, Victor Toso wrote: > 7 bytes in 1 blocks are definitely lost in loss record 128 of 10,009 >at 0x4C2A988: calloc (vg_replace_malloc.c:711) >by 0xB6C3200: g_malloc0 (gmem.c:124) >by 0x740BD5F: audio_playback_volume_i

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 02:45:05PM +0100, Victor Toso wrote: > I would rather that we wait to see if we find more issues. At the > moment, we don't have any. The coroutine context is the only one so far > that it was necessary to complete-in-idle. The other on > spice_usbredir_channel_open_acl_cb()

[Spice-devel] [PATCH] channel-main: fix leak on volume-sync

2016-03-23 Thread Victor Toso
7 bytes in 1 blocks are definitely lost in loss record 128 of 10,009 at 0x4C2A988: calloc (vg_replace_malloc.c:711) by 0xB6C3200: g_malloc0 (gmem.c:124) by 0x740BD5F: audio_playback_volume_info_cb (channel-main.c:1216) by 0xB11D488: g_task_return_now (gtask.c:1107) by 0xB11DCBD: g_ta

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-03-23 Thread Fabiano Fidêncio
On Wed, Mar 23, 2016 at 2:45 PM, Victor Toso wrote: > Hi, > > On Wed, Mar 23, 2016 at 02:32:06PM +0100, Christophe Fergeau wrote: >> On Wed, Mar 23, 2016 at 01:04:03PM +0100, Fabiano Fidêncio wrote: >> > gtask-helper provide methods that can easily be used for returning in >> > idle, as a few issu

Re: [Spice-devel] [PATCH] dispatcher: implement QXLWorker interface, do not use as a base class

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 09:51:24AM -0400, Frediano Ziglio wrote: > > > > > > Acked-by: Christophe Fergeau > > > > On Wed, Mar 23, 2016 at 01:05:11PM +, Frediano Ziglio wrote: > > > This allows RedDispatcher to be a Dispatcher. > > > > > The code is still fine, however subject and comment

Re: [Spice-devel] [PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 09:57:53AM -0400, Frediano Ziglio wrote: > > > > On Wed, Mar 23, 2016 at 01:06:26PM +, Frediano Ziglio wrote: > > > All other messages (even empty ones) have a structure defined. > > > > This is purely for consistency? Or was this causing issues? > > > > I don't thin

Re: [Spice-devel] [PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

2016-03-23 Thread Frediano Ziglio
> > On Wed, Mar 23, 2016 at 01:06:26PM +, Frediano Ziglio wrote: > > All other messages (even empty ones) have a structure defined. > > This is purely for consistency? Or was this causing issues? > I don't think this patch is going to change much bits of code. Pure consistency. > > > > Si

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-03-23 Thread Victor Toso
Hi, On Wed, Mar 23, 2016 at 02:32:06PM +0100, Christophe Fergeau wrote: > On Wed, Mar 23, 2016 at 01:04:03PM +0100, Fabiano Fidêncio wrote: > > gtask-helper provide methods that can easily be used for returning in > > idle, as a few issues have been found in the GTask code used in > > spice-gtk du

Re: [Spice-devel] [PATCH] dispatcher: implement QXLWorker interface, do not use as a base class

2016-03-23 Thread Frediano Ziglio
> > > Acked-by: Christophe Fergeau > > On Wed, Mar 23, 2016 at 01:05:11PM +, Frediano Ziglio wrote: > > This allows RedDispatcher to be a Dispatcher. > > The code is still fine, however subject and comment are a bit outdated. What about: qxl: implement QXLWorker interface, do not use as

Re: [Spice-devel] [PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 01:06:26PM +, Frediano Ziglio wrote: > All other messages (even empty ones) have a structure defined. This is purely for consistency? Or was this causing issues? > > Signed-off-by: Frediano Ziglio > --- > server/red-qxl.c| 3 ++- > server/red-qxl.h| 3 +++ >

Re: [Spice-devel] [PATCH] build-sys: use safer SPICE_CONTAINEROF version

2016-03-23 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Mar 23, 2016 at 01:37:49PM +, Frediano Ziglio wrote: > Enable additional checks for this macro. > > Signed-off-by: Frediano Ziglio > --- > configure.ac | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/configure.ac b/configure.ac > index f544

[Spice-devel] [PATCH] build-sys: use safer SPICE_CONTAINEROF version

2016-03-23 Thread Frediano Ziglio
Enable additional checks for this macro. Signed-off-by: Frediano Ziglio --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index f5445c0..9541b59 100644 --- a/configure.ac +++ b/configure.ac @@ -212,6 +212,8 @@ AC_CACHE_CHECK([if -Wl,--version-scri

Re: [Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 01:04:03PM +0100, Fabiano Fidêncio wrote: > gtask-helper provide methods that can easily be used for returning in > idle, as a few issues have been found in the GTask code used in > spice-gtk due to a immediately return when a return in idle was > expected. As examples of th

Re: [Spice-devel] [PATCH] dispatcher: implement QXLWorker interface, do not use as a base class

2016-03-23 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Mar 23, 2016 at 01:05:11PM +, Frediano Ziglio wrote: > This allows RedDispatcher to be a Dispatcher. > > Signed-off-by: Frediano Ziglio > --- > server/red-qxl.c | 83 > > 1 file changed, 48 inse

Re: [Spice-devel] [PATCH] build-sys: use safer SPICE_CONTAINEROF version

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 01:07:27PM +, Frediano Ziglio wrote: > Enable additional checks for this macro. > > Signed-off-by: Frediano Ziglio > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index f5445c0..c1b1b3a 10064

[Spice-devel] [PATCH] dispatcher: implement QXLWorker interface, do not use as a base class

2016-03-23 Thread Frediano Ziglio
This allows RedDispatcher to be a Dispatcher. Signed-off-by: Frediano Ziglio --- server/red-qxl.c | 83 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index 7ef9fe1..3ba697d 100644 --- a

[Spice-devel] [PATCH] build-sys: use safer SPICE_CONTAINEROF version

2016-03-23 Thread Frediano Ziglio
Enable additional checks for this macro. Signed-off-by: Frediano Ziglio --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f5445c0..c1b1b3a 100644 --- a/configure.ac +++ b/configure.ac @@ -82,7 +82,7 @@ dnl

[Spice-devel] [PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

2016-03-23 Thread Frediano Ziglio
All other messages (even empty ones) have a structure defined. Signed-off-by: Frediano Ziglio --- server/red-qxl.c| 3 ++- server/red-qxl.h| 3 +++ server/red-worker.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index 7ef9fe1

[Spice-devel] [PATCH 10/13] reds: Prepare to make VDIPortState a GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. Signed-off-by: Christophe Fergeau Signed-off-by: Frediano Ziglio --- server/reds.c | 383 +- 1 file changed, 194 insertions(+), 189 deletions(-) diff --git a/server/reds.c b/ser

[Spice-devel] [PATCH 11/13] reds: Make VDIPortState a GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. Signed-off-by: Christophe Fergeau --- server/reds-private.h | 2 +- server/reds.c | 242 -- 2 files changed, 157 insertions(+), 87 deletions(-) diff --git a/server/reds-private

[Spice-devel] [PATCH 13/13] Move SpiceCharDeviceCallbacks into RedCharDeviceClass

2016-03-23 Thread Frediano Ziglio
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 05/13] spicevmc: Introduce RedCharDeviceSpiceVmc GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau --- server/spicevmc.c | 102 ++ 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index f745fdb..0cf2cce 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -61,

[Spice-devel] [PATCH 06/13] spicevmc: Move SpiceVmcState::pipe_item to RedCharDeviceSpiceVmc

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau This pipe item belongs to the char device, not to the spicevmc channel. --- server/spicevmc.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/spicevmc.c b/server/spicevmc.c index 0cf2cce..9a009b9 100644 --- a/server/spicevmc.c +++

[Spice-devel] [PATCH 02/13] Free dispatchers at exit

2016-03-23 Thread Frediano Ziglio
From: Jonathon Jongsma --- server/red-qxl.c | 7 +++ server/red-qxl.h | 1 + server/reds.c| 2 ++ 3 files changed, 10 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index 8012b26..5233afd 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c @@ -939,6 +939,13 @@ void red_

[Spice-devel] [PATCH 12/13] reds: Remove spice_char_device_state_create()

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau Nothing is using it anymore now that CharDevice classes are gobjectified. --- server/char-device.c | 42 -- server/char-device.h | 11 +-- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/server/char-device.c

[Spice-devel] [PATCH 03/13] char-device: Prepare to make SpiceCharDeviceState a GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau Create a structure to hold private data. This helps to make patch for GObject smaller. Signed-off-by: Christophe Fergeau Signed-off-by: Frediano Ziglio --- server/char-device.c | 300 ++- 1 file changed, 152 insertions(+

[Spice-devel] [PATCH 07/13] smartcard: Prepare to turn SmartcardState into a GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. Once all char device states are converted, we can turn the associated vfuncs into RedCharDeviceClass vfuncs. Signed-off-by: Christophe Fergeau Signed-off-by: Frediano Ziglio --- server/smartcard.c | 142 +++

[Spice-devel] [PATCH 01/13] Convert Dispatcher and MainDispatcher to GObjects

2016-03-23 Thread Frediano Ziglio
From: Jonathon Jongsma Allows more explicit inheritance relationship, and numerous other advantages. --- server/dispatcher.c | 234 --- server/dispatcher.h | 53 ++- server/main-dispatcher.c | 157 +-- ser

[Spice-devel] [PATCH 08/13] smartcard: Turn SmartcardState into a GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau This inherits from RedCharDevice. Once all char device states are converted, we can turn the associated vfuncs into RedCharDeviceClass vfuncs. Signed-off-by: Christophe Fergeau --- server/smartcard.c | 125 ++--- server/s

[Spice-devel] [PATCH 04/13] char-device: Make SpiceCharDeviceState a GObject

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau --- server/char-device.c | 345 +++ server/char-device.h | 38 +- 2 files changed, 301 insertions(+), 82 deletions(-) diff --git a/server/char-device.c b/server/char-device.c index 6704678..c835499 100644 --- a/server

[Spice-devel] [PATCH 09/13] reds: Make VDIPortState private to reds.c

2016-03-23 Thread Frediano Ziglio
From: Christophe Fergeau VDIPortState and VDIReadBuf don't really need to be defined in a header file as they are only used in reds.c --- server/reds-private.h | 56 + server/reds.c | 167 +- 2 files changed, 113 insertions

[Spice-devel] [PATCH 00/13] Backported some patches from refactory branches (23th Mar)

2016-03-23 Thread Frediano Ziglio
Changes: - merged some patches; - split GObject patch from private field access; - move a hunk for property flag from VDI patch to CharDeviceState one; - change some FIXME comment to TODO; - rename some propoerty nick name; - update SpiceCharDeviceState finalize function. Christophe Fergeau (11):

Re: [Spice-devel] [PATCH v2 spice-gtk 2/2] widget: use allocation instead of window size

2016-03-23 Thread Pavel Grunt
On Wed, 2016-03-23 at 12:25 +0100, Marc-André Lureau wrote: > Since spice-gtk 57df040cc, the SpiceDisplay no longer forces its own > window. Get allocation instead of window size.  This fixes a "top > border" issue in spicy with gtk+ >= 3.19.8. > > Signed-off-by: Marc-André Lureau Acked-by: Pavel

[Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]

2016-03-23 Thread Fabiano Fidêncio
gtask-helper provide methods that can easily be used for returning in idle, as a few issues have been found in the GTask code used in spice-gtk due to a immediately return when a return in idle was expected. As examples of these issues, you can take a look on commits 7774b8c and e81d97c. Not all t

[Spice-devel] [PATCH v2 spice-gtk 2/2] widget: use allocation instead of window size

2016-03-23 Thread Marc-André Lureau
Since spice-gtk 57df040cc, the SpiceDisplay no longer forces its own window. Get allocation instead of window size. This fixes a "top border" issue in spicy with gtk+ >= 3.19.8. Signed-off-by: Marc-André Lureau --- src/Makefile.am | 1 - src/gtk-compat.h | 31 -

[Spice-devel] [PATCH v2 spice-gtk 1/2] widget: offset draw updates by widget allocation if necessary

2016-03-23 Thread Marc-André Lureau
According to gtk_widget_queue_draw_area() documentation: "The region here is specified in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that return TRUE for gtk_widget_get_has_window(), and are relative to w

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 07:09:14AM -0400, Frediano Ziglio wrote: > > For what it's worth, the only thing which is needed is the GMainContext, > > not the full-fledged RedWorker. It seems going from RedWorker to > > QXLInstance is easy, but I did not see an obvious way of getting a > > RedWorker fro

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-23 Thread Christophe Fergeau
On Mon, Mar 21, 2016 at 07:43:20PM +0100, Francois Gouget wrote: > A completely different approach to solving this would be to handle it > all in the GStreamer encoder code: > - Only ref the RedDrawable once but wrap it in a struct with its own >refcount. It's that struct which will track th

Re: [Spice-devel] [spice-gtk 2/2] Introduce gtask-helper.[ch]

2016-03-23 Thread Fabiano Fidêncio
On Wed, Mar 23, 2016 at 11:34 AM, Christophe Fergeau wrote: > On Wed, Mar 23, 2016 at 10:48:31AM +0100, Fabiano Fidêncio wrote: >> As noticed, GTask's heurestic for return a task in idle or immediately >> doesn't work when using Coroutine > > s/heurestic/heuristic/ > > Imo we need a detailed descr

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-23 Thread Frediano Ziglio
> > Hey, > > On Wed, Mar 23, 2016 at 05:32:22AM -0400, Frediano Ziglio wrote: > > > - But while QXLState does have a reds field, it's defined in red-qxl.c > > >so it's not accessible from red-worker.c and I have not found a > > >function that would return this information. > > > > You c

Re: [Spice-devel] [spice-gtk 2/2] Introduce gtask-helper.[ch]

2016-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2016 at 10:48:31AM +0100, Fabiano Fidêncio wrote: > As noticed, GTask's heurestic for return a task in idle or immediately > doesn't work when using Coroutine s/heurestic/heuristic/ Imo we need a detailed description of what is not working well with GTask + coroutine, and one conc

Re: [Spice-devel] [PATCH spice-gtk 2/2] widget: use allocation instead of window size

2016-03-23 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > This fixes the "top border" in spicy. > > considering how the allocation is used I would prefer some helper > function to get the width and height. > I will replace it with gtk_widget_get_allocated_{width,height} (don't know how I missed it)

Re: [Spice-devel] [spice-gtk 0/2] Introduce gtask-helper.[ch]

2016-03-23 Thread Pavel Grunt
Hi Fabiano, On Wed, 2016-03-23 at 10:48 +0100, Fabiano Fidêncio wrote: > The first patch is only about reverting a patch that, even if it > fixed > the problem, it wasn't done in the proper way. > The second patch introduces and uses new helpers for GTask, providing > them functions that will expl

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-23 Thread Christophe Fergeau
On Mon, Mar 21, 2016 at 07:43:20PM +0100, Francois Gouget wrote: > On Thu, 3 Mar 2016, Christophe Fergeau wrote: > [...] > > Making the refcounting thread safe is one thing, but then the code > > freeing the drawable needs to be thread-safe too. red_put_drawable might > > be fine (only looked brief

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-23 Thread Christophe Fergeau
Hey, On Wed, Mar 23, 2016 at 05:32:22AM -0400, Frediano Ziglio wrote: > > - But while QXLState does have a reds field, it's defined in red-qxl.c > >so it's not accessible from red-worker.c and I have not found a > >function that would return this information. > > You could use red_qxl_ge

[Spice-devel] [spice-gtk 2/2] Introduce gtask-helper.[ch]

2016-03-23 Thread Fabiano Fidêncio
As noticed, GTask's heurestic for return a task in idle or immediately doesn't work when using Coroutine and that's okay, we just need to do the idle ourself. And in order to avoid code duplication, let's introduce and make usage of the new g_task_helper_return_* functions. These functions match e

[Spice-devel] [spice-gtk 1/2] Revert "channel-usbredir: Fix crash due to a Task returning earlier than expected"

2016-03-23 Thread Fabiano Fidêncio
This reverts commit 7774b8c0dd85ce2bb311d8bbe1c25deb73970b6e. The crash was fixed, but not properly. GTask shouldn't return immediately in that scenario. Next patch brings a proper fix for the issue. Signed-off-by: Fabiano Fidêncio --- src/channel-usbredir.c | 2 +- 1 file changed, 1 insertion(

[Spice-devel] [spice-gtk 0/2] Introduce gtask-helper.[ch]

2016-03-23 Thread Fabiano Fidêncio
The first patch is only about reverting a patch that, even if it fixed the problem, it wasn't done in the proper way. The second patch introduces and uses new helpers for GTask, providing them functions that will explicitely return in idle instead of leaving the decision to the GTask heurestic (whi

Re: [Spice-devel] [PATCH 08/12] smartcard: Turn SmartcardState into a GObject

2016-03-23 Thread Frediano Ziglio
> > From: Christophe Fergeau > > This inherits from RedCharDevice. Once all char device states are > converted, we can turn the associated vfuncs into RedCharDeviceClass > vfuncs. > --- > server/smartcard.c | 221 > + > server/smartcard.h |

Re: [Spice-devel] [PATCH 10/12] reds: Make VDIPortState a gobject

2016-03-23 Thread Frediano Ziglio
> > From: Christophe Fergeau > > This inherits from RedCharDevice. > --- > server/char-device.c | 3 +- > server/reds-private.h | 2 +- > server/reds.c | 527 > -- > 3 files changed, 304 insertions(+), 228 deletions(-) > > diff --gi

Re: [Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

2016-03-23 Thread Frediano Ziglio
> > On Thu, 3 Mar 2016, Christophe Fergeau wrote: > [...] > > Making the refcounting thread safe is one thing, but then the code > > freeing the drawable needs to be thread-safe too. red_put_drawable might > > be fine (only looked briefly), but release_resource which is a vfunc > > provided by QEM

[Spice-devel] 答复: remote-viewer usb redirection

2016-03-23 Thread lichanghua
Maybe it is, but I try to recompile the spice-gtk and virt-viewer, I can't get correct result, Do anyone have the remote-viewer version supported USB_redirection in windows OS. thanks very much! best, -邮件原件- 发件人: Fabiano Fidêncio [mailto:fabi...@fidencio.org] 发送时间: 2016年3月23日 5:17 收件人:

Re: [Spice-devel] [PATCH spice-gtk 2/2] widget: use allocation instead of window size

2016-03-23 Thread Pavel Grunt
Hi, This fixes the "top border" in spicy. considering how the allocation is used I would prefer some helper function to get the width and height.  Thanks, Pavel On Tue, 2016-03-22 at 19:27 +0100, Marc-André Lureau wrote: > Since spice-gtk 57df040cc, the SpiceDisplay no longer forces its own > w

Re: [Spice-devel] [PATCH spice-gtk 1/2] widget: offset draw updates by widget allocation if necessary

2016-03-23 Thread Pavel Grunt
Hi Marc-André, On Tue, 2016-03-22 at 19:27 +0100, Marc-André Lureau wrote: > According to gtk_widget_queue_draw_area() documentation: > > "The region here is specified in widget coordinates. Widget > coordinates > are a bit odd; for historical reasons, they are defined as > widget->window coordin