1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

core: mark newly created window as damaged

Damage could have already happened at the time we call fill_win on a new
window. It's too difficult, or impossible, for us the find out if that
happened. So just blindly mark window as damaged.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-04-19 22:52:32 +01:00
parent 22e3eddbb4
commit 8fbbb2cfaa
No known key found for this signature in database
GPG key ID: 37C999F617EA1A47

View file

@ -1380,6 +1380,12 @@ static void handle_new_windows(session_t *ps) {
auto mw = (struct managed_win *)new_w;
if (mw->a.map_state == XCB_MAP_STATE_VIEWABLE) {
map_win(ps, mw);
// This window might be damaged before we called fill_win
// and created the damage handle. And there is not way for
// us to find out. So just blindly mark it damaged
mw->ever_damaged = true;
add_damage_from_win(ps, mw);
}
}
}