[evince] libview: Stop the cursor blink when there are selections active



commit 41c660fe01369752a9f464317d0d9506f0c98304
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Fri Jul 12 14:38:38 2013 +0200

    libview: Stop the cursor blink when there are selections active
    
    Even though the caret cursor is not shown while there are active
    selections we don't want the cursor blink timeout running and scheduling
    redraws.

 libview/ev-view.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 4bc37c7..772cbb2 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -3128,7 +3128,9 @@ cursor_should_blink (EvView *view)
 {
        if (view->caret_enabled &&
            view->rotation == 0 &&
-           gtk_widget_has_focus (GTK_WIDGET (view))) {
+           gtk_widget_has_focus (GTK_WIDGET (view)) &&
+           view->pixbuf_cache &&
+           !ev_pixbuf_cache_get_selection_region (view->pixbuf_cache, view->cursor_page, view->scale)) {
                GtkSettings *settings;
                gboolean blink;
 
@@ -7643,6 +7645,8 @@ merge_selection_region (EvView *view,
                }
        }
 
+       ev_view_check_cursor_blink (view);
+
        /* Free the old list, now that we're done with it. */
        g_list_free_full (old_list, (GDestroyNotify)selection_free);
 }


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