summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorJason Crain <[email protected]>2013-06-24 23:35:27 -0500
committerraveit65 <[email protected]>2017-09-06 18:25:34 +0200
commit00a113c585f09c89aa2af55ef4070b03061490aa (patch)
tree5b02192def7f5a2d32ff2d793d957ce2f3c2da1a /libview
parent37fec5daa5de7dfc9d7e37bb54dfa880478fdbd2 (diff)
downloadatril-00a113c585f09c89aa2af55ef4070b03061490aa.tar.bz2
atril-00a113c585f09c89aa2af55ef4070b03061490aa.tar.xz
libview: Invalidate union of old and new selection
Instead of using xor, use the union of old_sel and new_sel to find what needs redrawing. https://bugzilla.gnome.org/show_bug.cgi?id=703024 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=9fd3d7d
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 12b5a548..b4755494 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7598,11 +7598,10 @@ merge_selection_region (EvView *view,
/* Now we figure out what needs redrawing */
if (old_sel && new_sel) {
if (old_sel->covered_region && new_sel->covered_region) {
- /* We only want to redraw the areas that have
- * changed, so we xor the old and new regions
- * and redraw if it's different */
+ /* Anything that was previously or currently selected may
+ * have changed */
region = cairo_region_copy (old_sel->covered_region);
- cairo_region_xor (region, new_sel->covered_region);
+ cairo_region_union (region, new_sel->covered_region);
if (cairo_region_is_empty (region)) {
cairo_region_destroy (region);