1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-03 04:33:49 -05:00

core: don't call map_win_start in handle_new_windows

Set WIN_FLAGS_MAPPED instead, it will be handled later. Previously, we
call map_win_start because we need the geometry of the window, which is
updated in map_win_start. Now, we get the geometry in fill_win, so
map_win_start is not needed anymore.

Eliminate a case where destroy_backend could see IMAGES_STALE flags set
on windows.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2020-11-28 22:48:01 +00:00
parent e49ef2ccd8
commit 60f733d17c
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -1346,10 +1346,7 @@ static void handle_new_windows(session_t *ps) {
} }
auto mw = (struct managed_win *)new_w; auto mw = (struct managed_win *)new_w;
if (mw->a.map_state == XCB_MAP_STATE_VIEWABLE) { if (mw->a.map_state == XCB_MAP_STATE_VIEWABLE) {
// Have to map immediately instead of queue window update win_set_flags(mw, WIN_FLAGS_MAPPED);
// because we need the window's extent right now.
// We can do this because we are in the critical section.
map_win_start(ps, mw);
// This window might be damaged before we called fill_win // This window might be damaged before we called fill_win
// and created the damage handle. And there is no way for // and created the damage handle. And there is no way for