Blame SOURCES/evince-3.8.3-get-selection-rectangles.patch
|
|
86b3b9 |
diff --git a/libview/ev-view.c b/libview/ev-view.c
|
|
|
86b3b9 |
index 74b2781..085c9e3 100644
|
|
|
86b3b9 |
--- a/libview/ev-view.c
|
|
|
86b3b9 |
+++ b/libview/ev-view.c
|
|
|
86b3b9 |
@@ -6342,20 +6342,22 @@ merge_selection_region (EvView *view,
|
|
|
86b3b9 |
region = NULL;
|
|
|
86b3b9 |
} else {
|
|
|
86b3b9 |
gint num_rectangles = cairo_region_num_rectangles (region);
|
|
|
86b3b9 |
- GdkRectangle r;
|
|
|
86b3b9 |
+ GdkRectangle r1, r2;
|
|
|
86b3b9 |
|
|
|
86b3b9 |
/* We need to make the damage region a little bigger
|
|
|
86b3b9 |
* because the edges of the old selection might change
|
|
|
86b3b9 |
*/
|
|
|
86b3b9 |
- cairo_region_get_rectangle (region, 0, &r);
|
|
|
86b3b9 |
- r.x -= 5;
|
|
|
86b3b9 |
- r.width = 5;
|
|
|
86b3b9 |
- cairo_region_union_rectangle (region, &r);
|
|
|
86b3b9 |
-
|
|
|
86b3b9 |
- cairo_region_get_rectangle (region, num_rectangles - 1, &r);
|
|
|
86b3b9 |
- r.x += r.width;
|
|
|
86b3b9 |
- r.width = 5;
|
|
|
86b3b9 |
- cairo_region_union_rectangle (region, &r);
|
|
|
86b3b9 |
+ cairo_region_get_rectangle (region, 0, &r1;;
|
|
|
86b3b9 |
+ cairo_region_get_rectangle (region, num_rectangles - 1, &r2;;
|
|
|
86b3b9 |
+
|
|
|
86b3b9 |
+ r1.x -= 5;
|
|
|
86b3b9 |
+ r1.width = 5;
|
|
|
86b3b9 |
+
|
|
|
86b3b9 |
+ r2.x += r2.width;
|
|
|
86b3b9 |
+ r2.width = 5;
|
|
|
86b3b9 |
+
|
|
|
86b3b9 |
+ cairo_region_union_rectangle (region, &r1;;
|
|
|
86b3b9 |
+ cairo_region_union_rectangle (region, &r2;;
|
|
|
86b3b9 |
}
|
|
|
86b3b9 |
} else if (old_sel->covered_region) {
|
|
|
86b3b9 |
region = cairo_region_copy (old_sel->covered_region);
|