mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
backend/x11: keep track of exposed rects, add them to damage regions
When we receive an Expose event, that means that we must redraw that region of the X11 window. Keep track of these regions with pixman regions, and merge them with the additional output damaged regions. Fixes #2670
This commit is contained in:
parent
922b7f415d
commit
7bc8dbb991
3 changed files with 13 additions and 2 deletions
|
|
@ -72,6 +72,9 @@ 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);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue