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:
Ilia Mirkin 2021-01-21 06:24:52 -05:00 committed by Simon Ser
parent 922b7f415d
commit 7bc8dbb991
3 changed files with 13 additions and 2 deletions

View file

@ -14,6 +14,7 @@
#include <xcb/xcb_errors.h>
#endif
#include <pixman.h>
#include <wlr/backend/x11.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_keyboard.h>
@ -47,6 +48,8 @@ struct wlr_x11_output {
struct wl_list buffers; // wlr_x11_buffer::link
pixman_region32_t exposed;
uint64_t last_msc;
};