backend/x11: re-send last buffer on expose event

Instead of requesting a new frame from the compositor when we
receive an expose event, re-submit the last frame. This makes the
X11 backend behave like the other backends and removes the last
wlr_output_update_needs_frame() call in backends, at the cost of
keeping the current buffer locked for potentially a longer time.
This commit is contained in:
Simon Ser 2023-08-16 10:42:56 +02:00
parent 664ec59095
commit 5da9ad3e34
3 changed files with 81 additions and 27 deletions

View file

@ -69,10 +69,7 @@ static void handle_x11_event(struct wlr_x11_backend *x11,
struct wlr_x11_output *output =
get_x11_output_from_window_id(x11, ev->window);
if (output != NULL) {
pixman_region32_union_rect(
&output->exposed, &output->exposed,
ev->x, ev->y, ev->width, ev->height);
wlr_output_update_needs_frame(&output->wlr_output);
handle_x11_expose_event(output, ev);
}
break;
}