win: add functions for delayed window updates

And a window update flag for mapping the window.

Also make sure related functions consider the case where the given window
has pending updates.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-09-20 01:59:25 +01:00
parent 16bff8ff41
commit 9f3d3f2fba
5 changed files with 77 additions and 12 deletions

View File

@ -546,8 +546,8 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t
}
static inline void repair_win(session_t *ps, struct managed_win *w) {
if (w->a.map_state != XCB_MAP_STATE_VIEWABLE)
return;
// Only mapped window can receive damages
assert(win_is_mapped_in_x(w));
region_t parts;
pixman_region32_init(&parts);