Sanitise buffer damage from compositor

Some compositors fail to send properly bounded damage regions. Let's
not crash when that happens.
v0.7
Andri Yngvason 2023-11-02 22:42:12 +00:00
parent f9b129e096
commit 4a518986b8
1 changed files with 3 additions and 0 deletions

View File

@ -948,6 +948,9 @@ void wayvnc_process_frame(struct wayvnc* self)
nvnc_fb_set_transform(buffer->nvnc_fb,
(enum nvnc_transform)buffer_transform);
pixman_region_intersect_rect(&damage, &damage, 0, 0, buffer->width,
buffer->height);
nvnc_display_feed_buffer(self->nvnc_display, buffer->nvnc_fb,
&damage);