win: handle destruction of unmanaged window

Previous destructions of unmanaged window are silently ignored, causing
windows with duplicated IDs.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-19 02:15:31 +01:00
parent 883d8c9142
commit 927cdd8652
3 changed files with 24 additions and 4 deletions

View File

@ -421,6 +421,8 @@ struct win *add_win_top(session_t *ps, xcb_window_t id);
void fill_win(session_t *ps, struct win *win);
/// Unmap or destroy a window
void unmap_win(session_t *ps, struct managed_win **, bool destroy);
/// Destroy an unmanaged window
void destroy_unmanaged_win(session_t *ps, struct win **w);
void map_win(session_t *ps, struct managed_win *w);
void map_win_by_id(session_t *ps, xcb_window_t id);