Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-05-20 09:22:53 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-05-20 09:22:53 (GMT)
commit2c8f2e225edad376a726a8efe86923c20c6c2c01 (patch)
tree9ef2cdcb6659be42797e73f98552944bd51a1895 /shell/ev-view.c
parent681b0a3166a61b96b9a0ee35ca1b0aaa487809b3 (diff)
Fix flickering on resizing
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index e9cbee5..d9dddaf 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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));
}