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 d4fde6a392
commit 5069193893
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 6 additions and 0 deletions

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);
}
}
}