Re: [Spice-devel] [PATCH spice-gtk] gtk-session: Set value directly

2017-02-17 Thread Pavel Grunt
On Fri, 2017-02-17 at 10:01 -0600, Jonathon Jongsma wrote: > On Fri, 2017-02-17 at 13:44 +0100, Pavel Grunt wrote: > > Spotted by coverity > > Acked-by: Jonathon Jongsma > > out of curiosity, what did coverity actually say here? > spice-gtk-0.33.53-7cb7-dirty/src/spice-gtk-session.c:920:9: not

Re: [Spice-devel] [PATCH spice-server] Fix minor inconsistencies with declaration and definition

2017-02-17 Thread Jonathon Jongsma
A good example of where using bool would help us ;) Acked-by: Jonathon Jongsma On Thu, 2017-02-16 at 10:08 +, Frediano Ziglio wrote: > Declaration used gboolean while definition used int. > > Signed-off-by: Frediano Ziglio > --- >  server/agent-msg-filter.c   | 2 +- >  server/red-channel-

Re: [Spice-devel] [PATCH spice-gtk] gtk-session: Set value directly

2017-02-17 Thread Jonathon Jongsma
On Fri, 2017-02-17 at 13:44 +0100, Pavel Grunt wrote: > Spotted by coverity Acked-by: Jonathon Jongsma out of curiosity, what did coverity actually say here? > --- >  src/spice-gtk-session.c | 6 ++ >  1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/spice-gtk-session.c

[Spice-devel] [PATCH spice-gtk] gtk-session: Set value directly

2017-02-17 Thread Pavel Grunt
Spotted by coverity --- src/spice-gtk-session.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c index a3a2e90..5688cba 100644 --- a/src/spice-gtk-session.c +++ b/src/spice-gtk-session.c @@ -916,25 +916,23 @@ static gboolea

Re: [Spice-devel] [spice-gtk v2] channel: Move local variables to inner block

2017-02-17 Thread Pavel Grunt
On Fri, 2017-02-17 at 12:16 +0100, Christophe Fergeau wrote: > On Fri, Feb 17, 2017 at 11:35:07AM +0100, Pavel Grunt wrote: > > > @@ -2382,12 +2378,17 @@ static int > > > spice_channel_load_ca(SpiceChannel *channel) > > >  CHANNEL_DEBUG(channel, "Load CA, file: %s, data: %p", > > > ca_file, > >

Re: [Spice-devel] [spice-gtk v2] channel: Move local variables to inner block

2017-02-17 Thread Christophe Fergeau
On Fri, Feb 17, 2017 at 11:35:07AM +0100, Pavel Grunt wrote: > > @@ -2382,12 +2378,17 @@ static int > > spice_channel_load_ca(SpiceChannel *channel) > >  CHANNEL_DEBUG(channel, "Load CA, file: %s, data: %p", ca_file, > > ca); > >   > >  if (ca != NULL) { > > +STACK_OF(X509_INFO) *in

Re: [Spice-devel] [spice-gtk v2] channel: Move local variables to inner block

2017-02-17 Thread Pavel Grunt
On Fri, 2017-02-17 at 11:22 +0100, Christophe Fergeau wrote: > Less things to keep track of when taking a quick look at the code > flow > of the spice_channel_load_ca() method. > > Signed-off-by: Christophe Fergeau Acked-by: Pavel Grunt > --- >  src/spice-channel.c | 9 + >  1 file change

[Spice-devel] [PATCH spice-gtk v5 5/6] gtk: Avoid deprecated gdk_pointer_grab

2017-02-17 Thread Pavel Grunt
gdk_pointer_grab() was deprecated in 3.0 for gdk_device_grab() but that was also deprecated for gdk_seat_grab() in 3.20 Acked-by: Victor Toso Acked-by: Christophe Fergeau --- src/spice-widget.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src

[Spice-devel] [PATCH spice-gtk v5 2/6] gtk: Use gdk_window_get_device_position

2017-02-17 Thread Pavel Grunt
gdk_window_get_pointer has been deprecated since Gtk 3.0 Introduce helper functions for getting the display's pointing device and modifiers to keep the update_mouse_mode simple Acked-by: Christophe Fergeau --- src/spice-widget.c | 42 -- 1 file changed, 3

[Spice-devel] [PATCH spice-gtk v5 6/6] usb-device-widget: Migrate to GtkGrid from GtkBox

2017-02-17 Thread Pavel Grunt
GtkVBox is deprecated since Gtk 3.2, GtkBox is going to be deprecated. Just use the GtkGrid and GtkContainer api. --- GtkContainer is an abstract class, so let's use the Grid with the vertical orientation --- src/usb-device-widget.c | 25 ++--- 1 file changed, 14 insertions(+)

[Spice-devel] [PATCH spice-gtk v5 4/6] gtk: Avoid deprecated gdk_keyboard_grab

2017-02-17 Thread Pavel Grunt
gdk_keyboard_grab() was deprecated in 3.0 for gdk_device_grab() but that was also deprecated for gdk_seat_grab() in 3.20 Acked-by: Christophe Fergeau --- src/spice-widget.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/spice-widget.c b/src/spice-widget.c ind

[Spice-devel] [PATCH spice-gtk v5 1/6] gtk: Use gdk_cursor_new_from_name

2017-02-17 Thread Pavel Grunt
gdk_cursor_new has been deprecated since Gtk 3.16 A difference is that the helper function for creating the cursor returns early if the widget is not realized. Also allow to hide the cursor under Wayland Acked-by: Victor Toso --- src/spice-widget.c | 24 1 file changed

[Spice-devel] [PATCH spice-gtk v5 3/6] gtk: Use gdk_device_warp

2017-02-17 Thread Pavel Grunt
gdk_display_warp_pointer has been deprecated since Gtk 3.0 In Wayland gdk_device_warp is noop making server mouse mode unusable, see: https://bugzilla.redhat.com/show_bug.cgi?id=1285378 Acked-by: Victor Toso --- src/spice-widget.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[Spice-devel] [PATCH spice-gtk v5 0/6] Avoid usage of deprecated functions

2017-02-17 Thread Pavel Grunt
Hi, this is a follow up to Francois's patches which avoided some deprecated warnings in the SpiceDisplay widget. (Also it seems that the client behavior under Wayland is better (reported by Christophe), there are still some issues with server mouse mode - https://bugzilla.redhat.com/show_bug.cgi?

[Spice-devel] [spice-gtk v2] channel: Move local variables to inner block

2017-02-17 Thread Christophe Fergeau
Less things to keep track of when taking a quick look at the code flow of the spice_channel_load_ca() method. Signed-off-by: Christophe Fergeau --- src/spice-channel.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/spice-channel.c b/src/spice-channel.c index 655

Re: [Spice-devel] [spice-gtk] channel: Move local variables to inner block

2017-02-17 Thread Christophe Fergeau
On Thu, Feb 16, 2017 at 04:36:35PM +0100, Pavel Grunt wrote: > On Thu, 2017-02-16 at 16:13 +0100, Christophe Fergeau wrote: > > Less things to keep track of when taking a quick look at the code > > flow > > of the spice_channel_load_ca() method. > > > > Signed-off-by: Christophe Fergeau > > --- >

Re: [Spice-devel] [PATCH spice-gtk v4 3/6] gtk: Use gdk_device_warp

2017-02-17 Thread Pavel Grunt
On Thu, 2017-02-16 at 17:08 +0100, Christophe Fergeau wrote: > On Tue, Feb 14, 2017 at 07:05:15PM +0100, Pavel Grunt wrote: > > gdk_display_warp_pointer has been deprecated since Gtk 3.0 > > I guess you can mention in the log/in a comment that gdk_*_warp is a > no-op on wayland. ok, I will add a

Re: [Spice-devel] [PATCH spice-gtk v4 2/6] gtk: Use gdk_window_get_device_position

2017-02-17 Thread Pavel Grunt
On Thu, 2017-02-16 at 17:13 +0100, Christophe Fergeau wrote: > On Thu, Feb 16, 2017 at 05:05:49PM +0100, Christophe Fergeau wrote: > > On Tue, Feb 14, 2017 at 07:05:14PM +0100, Pavel Grunt wrote: > > > gdk_window_get_pointer has been deprecated since Gtk 3.0 > > > > > > Introduce helper functions

Re: [Spice-devel] [PATCH spice-gtk v4 1/6] gtk: Use gdk_cursor_new_from_name

2017-02-17 Thread Pavel Grunt
Hi Christophe, On Thu, 2017-02-16 at 17:04 +0100, Christophe Fergeau wrote: > On Tue, Feb 14, 2017 at 07:05:13PM +0100, Pavel Grunt wrote: > > gdk_cursor_new has been deprecated since Gtk 3.16 > > > > Create the cursor when the widget is realized > > You mention this in the commit log which make