summaryrefslogtreecommitdiffstats
path: root/client/screen_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/screen_layer.cpp')
-rw-r--r--client/screen_layer.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/client/screen_layer.cpp b/client/screen_layer.cpp
index af25211e..ef5ef95e 100644
--- a/client/screen_layer.cpp
+++ b/client/screen_layer.cpp
@@ -93,13 +93,26 @@ uint64_t ScreenLayer::invalidate(const SpiceRect& r, bool urgent)
void ScreenLayer::invalidate(const QRegion& region)
{
+ pixman_box32_t *rects, *end;
+ int num_rects;
+
if (!_screen) {
return;
}
- SpiceRect *r = region.rects;
- SpiceRect *end = r + region.num_rects;
- while (r != end) {
- invalidate_rect(*r++, false);
+
+ rects = pixman_region32_rectangles((pixman_region32_t *)&region, &num_rects);
+ end = rects + num_rects;
+
+ while (rects != end) {
+ SpiceRect r;
+
+ r.left = rects->x1;
+ r.top = rects->y1;
+ r.right = rects->x2;
+ r.bottom = rects->y2;
+ rects++;
+
+ invalidate_rect(r, false);
}
}