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:
parent
22e3eddbb4
commit
8fbbb2cfaa
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue