[Xfce4-commits] <ristretto:master> Improved performance when drawing the zoom-box, don't do a refresh when performing a queued_repaint, just paint the darn thing.

Stephan Arts stephan at xfce.org
Wed Aug 12 12:16:16 CEST 2009


Updating branch refs/heads/master
         to fa5894a0df7f1bc7052c17fd2085e81b906497ba (commit)
       from 67ce593c1d98dc141cfa28df268c5d5ff4338e02 (commit)

commit fa5894a0df7f1bc7052c17fd2085e81b906497ba
Author: Stephan Arts <stephan at xfce.org>
Date:   Sat Feb 21 18:00:43 2009 +0100

    Improved performance when drawing the zoom-box, don't do a refresh when performing a queued_repaint, just paint the darn thing.

 src/picture_viewer.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/picture_viewer.c b/src/picture_viewer.c
index 150a51f..6710a6a 100644
--- a/src/picture_viewer.c
+++ b/src/picture_viewer.c
@@ -987,6 +987,10 @@ cb_rstto_picture_viewer_motion_notify_event (RsttoPictureViewer *viewer,
                 }
                 break;
             case RSTTO_PICTURE_VIEWER_STATE_BOX_ZOOM:
+                if (viewer->priv->refresh.idle_id)
+                {
+                    g_source_remove(viewer->priv->refresh.idle_id);
+                }
                 viewer->priv->refresh.idle_id = g_idle_add((GSourceFunc)cb_rstto_picture_viewer_queued_repaint, viewer);
                 break;
             default:
@@ -999,7 +1003,7 @@ cb_rstto_picture_viewer_motion_notify_event (RsttoPictureViewer *viewer,
 static gboolean 
 cb_rstto_picture_viewer_queued_repaint(RsttoPictureViewer *viewer)
 {
-    rstto_picture_viewer_refresh(viewer);
+    //rstto_picture_viewer_refresh(viewer);
     rstto_picture_viewer_paint(GTK_WIDGET(viewer));
 
     g_source_remove(viewer->priv->refresh.idle_id);



More information about the Xfce4-commits mailing list