Re: [patch] request an update



On Thu, Oct 15, 2009 at 02:29:59PM -0300, Jonh Wendell wrote:
> Hi, folks.
> 
> Attached is a trivial patch that adds the ability to request a screen
> update. As most of vnc clients have this feature, vinagre users want
> this feature in too.
> 
> OK to commit?

While I don't much like the idea of the user having to force updates,
there are too many broken VNC servers out in the real world for us
to avoid it. So, ACK to this patch.

Daniel

> diff --git a/src/vncdisplay.c b/src/vncdisplay.c
> index 05df8d2..f779a63 100644
> --- a/src/vncdisplay.c
> +++ b/src/vncdisplay.c
> @@ -2311,6 +2311,23 @@ vnc_display_get_option_entries (void)
>  	return gtk_vnc_args;
>  }
>  
> +gboolean
> +vnc_display_request_update(VncDisplay *obj)
> +{
> +	g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
> +
> +	if (!obj->priv->gvnc || !gvnc_is_initialized(obj->priv->gvnc))
> +		return FALSE;
> +
> +	GVNC_DEBUG ("Requesting a full update");
> +	return gvnc_framebuffer_update_request(obj->priv->gvnc,
> +					       0,
> +					       0,
> +					       0,
> +					       obj->priv->fb.width,
> +					       obj->priv->fb.height);
> +}
> +
>  #ifdef WIN32
>  
>  /* On Windows, we must call WSAStartup before using any sockets and we
> diff --git a/src/vncdisplay.h b/src/vncdisplay.h
> index 3a995eb..53bb246 100644
> --- a/src/vncdisplay.h
> +++ b/src/vncdisplay.h
> @@ -147,6 +147,8 @@ gboolean	vnc_display_is_pointer_absolute(VncDisplay *obj);
>  GOptionGroup *  vnc_display_get_option_group(void);
>  const GOptionEntry *  vnc_display_get_option_entries(void);
>  
> +gboolean	vnc_display_request_update(VncDisplay *obj);
> +
>  G_END_DECLS
>  
>  #endif


Daniel
-- 
|: http://berrange.com/     -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/    -o-   http://gtk-vnc.sourceforge.net :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]