Sanitise buffer damage from compositor

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

View File

@ -963,6 +963,9 @@ void wayvnc_process_frame(struct wayvnc* self)
nvnc_fb_set_transform(buffer->nvnc_fb, nvnc_fb_set_transform(buffer->nvnc_fb,
(enum nvnc_transform)buffer_transform); (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, nvnc_display_feed_buffer(self->nvnc_display, buffer->nvnc_fb,
&damage); &damage);