[evince] libview: Do not redraw after a click if cursor position hasn't changed



commit e11816546f79bd241c3e17f4e5a8ffa517acb245
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Wed Jun 19 13:19:23 2013 +0200

    libview: Do not redraw after a click if cursor position hasn't changed

 libview/ev-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 0d1d440..042ad64 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4155,7 +4155,8 @@ ev_view_button_press_event (GtkWidget      *widget,
                                if (EV_IS_SELECTION (view->document))
                                        start_selection_for_event (view, event);
 
-                               if (get_caret_cursor_offset_at_location (view, event->x, event->y, &page, 
&offset)) {
+                               if (get_caret_cursor_offset_at_location (view, event->x, event->y, &page, 
&offset) &&
+                                   (view->cursor_offset != offset || view->cursor_page != page)) {
                                        view->cursor_offset = offset;
                                        view->cursor_page = page;
                                        gtk_widget_queue_draw (widget);


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