summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorCarlos Garcia Campos <[email protected]>2013-07-12 14:38:38 +0200
committerraveit65 <[email protected]>2017-09-06 18:25:34 +0200
commit372018254ef9d5ad2672e0359e8ba23b3e4c0f3d (patch)
treed3c0ed37380ec0b177f17e29e3d4d8f59174b63a /libview
parentb8a5accb01cf79c65e4af8d493bc74a098f7a612 (diff)
downloadatril-372018254ef9d5ad2672e0359e8ba23b3e4c0f3d.tar.bz2
atril-372018254ef9d5ad2672e0359e8ba23b3e4c0f3d.tar.xz
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. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=41c660f
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index b9e79026..06bc8c8f 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -3245,7 +3245,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;
@@ -7767,6 +7769,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);
}