]> www.fi.muni.cz Git - evince.git/commitdiff
Fix flickering on resizing
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Fri, 20 May 2005 09:22:53 +0000 (09:22 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Fri, 20 May 2005 09:22:53 +0000 (09:22 +0000)
ChangeLog
shell/ev-view.c

index 6188d1e8073c84d4932294a297ed1d69a1c8ec8a..fe688aea62ffd126c04cc6359c73f67df732eb70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri May 20 02:00:03 2005  Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+       * shell/ev-view.c: Use gdk_widget_queue_draw to remove
+       flickering on resize but still use gdk_window_scroll on
+       scrolling
+
 Fri May 20 01:46:57 2005  Jonathan Blandford  <jrb@redhat.com>
 
        * shell/ev-view.c: Patch from Nickolay Shmyrev to fix the -p
index e9cbee5e180f68895b3c389619bf78901eb6d4c7..d9dddaf24e61c304635f5d9f6f4af6c34cf571a1 100644 (file)
@@ -149,6 +149,7 @@ struct _EvView {
        EvSizingMode sizing_mode;
        
        PendingScroll pending_scroll;
+       gboolean pending_resize;
 };
 
 struct _EvViewClass {
@@ -376,9 +377,12 @@ view_update_adjustments (EvView *view)
        } else {
                view->scroll_y = 0;
        }
-               
-       //      gtk_widget_queue_draw (GTK_WIDGET (view));
-       gdk_window_scroll (GTK_WIDGET (view)->window, dx, dy);
+       
+       
+       if (view->pending_resize)       
+               gtk_widget_queue_draw (GTK_WIDGET (view));
+       else
+               gdk_window_scroll (GTK_WIDGET (view)->window, dx, dy);
 
 
        if (view->document)
@@ -1226,6 +1230,7 @@ ev_view_size_allocate (GtkWidget      *widget,
        view_set_adjustment_values (view, GTK_ORIENTATION_VERTICAL);
 
        view->pending_scroll = SCROLL_TO_KEEP_POSITION;
+       view->pending_resize = FALSE;
 
        if (view->document)
                view_update_range_and_current_page (view);              
@@ -1995,6 +2000,7 @@ ev_view_set_zoom (EvView   *view,
        if (ABS (view->scale - scale) < EPSILON)
                return;
        view->scale = scale;
+       view->pending_resize = TRUE;
 
        gtk_widget_queue_resize (GTK_WIDGET (view));
 }