On Mon, Jul 16, 2012 at 06:57:51PM +0200, Marc-André Lureau wrote:
> This can avoid having multiple idler added
> ---
>  src/virt-viewer-display.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
> index 18fed19..004f027 100644
> --- a/src/virt-viewer-display.c
> +++ b/src/virt-viewer-display.c
> @@ -326,6 +326,7 @@ virt_viewer_display_idle(gpointer opaque)
>      VirtViewerDisplayPrivate *priv = display->priv;
>      if (!priv->dirty)
>          gtk_widget_queue_resize_no_redraw(GTK_WIDGET(display));
> +    priv->dirty = FALSE;

priv->dirty is only set to FALSE in the place you changed, this means that
after your change the
if (!priv->dirty)
    gtk_widget_queue_resize_no_redraw(GTK_WIDGET(display));
just above will never run.
I think the intent of this code is this:
'queue an idle to do the resize, but use dirty to know about size changes
happening between the time the idle was queued and the time the idle runs'

Christophe

Attachment: pgp5wWRR0UH6v.pgp
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to