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

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 16 16:57:51 UTC 2012


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;
     return FALSE;
 }
 
@@ -437,7 +438,6 @@ end:
      */
     if (priv->dirty) {
         g_idle_add(virt_viewer_display_idle, widget);
-        priv->dirty = FALSE;
     }
 }
 
-- 
1.7.10.4




More information about the virt-tools-list mailing list