core: mark pre-existing window as damaged

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-04-27 14:20:40 +01:00
parent a40fdb86e1
commit 1b00eeaf60
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 3 additions and 0 deletions

View File

@ -2019,6 +2019,9 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
auto mw = (struct managed_win *)w; auto mw = (struct managed_win *)w;
if (mw->a.map_state == XCB_MAP_STATE_VIEWABLE) { if (mw->a.map_state == XCB_MAP_STATE_VIEWABLE) {
map_win(ps, mw); map_win(ps, mw);
// This is a pre-existing window, we have no idea if it's
// ever damaged, so assume conservatively that it is.
mw->ever_damaged = true;
} }
} }