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

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



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


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