From 5069193893e30e7355a3dc4d292320aeaede082b Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 19 Apr 2019 22:52:32 +0100 Subject: [PATCH] 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 --- src/compton.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compton.c b/src/compton.c index 15a124f..2c71854 100644 --- a/src/compton.c +++ b/src/compton.c @@ -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); } } }