Don't call map_win() in add_win()

Only case where you want to map window in add_win() is during compton
startup, when compton is registering existing windows. Otherwise,
add_win() is always called for newly created windows, so there will
always be a MapNotify coming up for that window. If we map newly created
windows in add_win(), we will try to map it a second time when the MapNotify
arrives.

So, just don't call map_win() from add_win(). For compton startup, we
explicitly call map_win() after calling add_win() in session_init.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-02-21 02:29:06 +00:00
parent ff37cf9756
commit 6c71146f1c
4 changed files with 39 additions and 27 deletions

View File

@@ -41,8 +41,6 @@ find_client_win(session_t *ps, xcb_window_t w);
win *find_toplevel2(session_t *ps, xcb_window_t wid);
void map_win(session_t *ps, xcb_window_t id);
/**
* Subtract two unsigned long values.
*