Re: [PATCH virt-viewer 16/19] Wait until idle handler has run to mark dirty = FALSE

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

 



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: pgpIl0scQerXL.pgp
Description: PGP signature


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux