Remove the remaining users of win::destroying

And remove win::destroying as well.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-02-20 01:21:58 +00:00
parent 98d8e84680
commit ae9dee8a9a
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
2 changed files with 4 additions and 10 deletions

View File

@ -790,7 +790,7 @@ restack_win(session_t *ps, win *w, xcb_window_t new_above) {
log_trace("Window stack modified. Current stack:"); log_trace("Window stack modified. Current stack:");
for (win *c = ps->list; c; c = c->next) { for (win *c = ps->list; c; c = c->next) {
const char *desc = ""; const char *desc = "";
if (c->destroying) { if (c->state == WSTATE_DESTROYING) {
desc = "(D) "; desc = "(D) ";
} }
log_trace("%#010x \"%s\" %s", c->id, c->name, desc); log_trace("%#010x \"%s\" %s", c->id, c->name, desc);
@ -2701,11 +2701,7 @@ session_init(int argc, char **argv, Display *dpy, const char *config_file,
free(reply); free(reply);
log_trace("Initial stack:"); log_trace("Initial stack:");
for (win *c = ps->list; c; c = c->next) { for (win *c = ps->list; c; c = c->next) {
const char *desc = ""; log_trace("%#010x \"%s\"", c->id, c->name);
if (c->destroying) {
desc = "(D) ";
}
log_trace("%#010x \"%s\" %s", c->id, c->name, desc);
} }
} }
@ -2761,8 +2757,9 @@ session_destroy(session_t *ps) {
for (win *w = list; w; w = next) { for (win *w = list; w; w = next) {
next = w->next; next = w->next;
if (w->a.map_state == XCB_MAP_STATE_VIEWABLE && !w->destroying) if (w->state != WSTATE_DESTROYING) {
win_ev_stop(ps, w); win_ev_stop(ps, w);
}
free_win_res(ps, w); free_win_res(ps, w);
free(w); free(w);

View File

@ -171,9 +171,6 @@ struct win {
bool reg_ignore_valid; bool reg_ignore_valid;
/// Cached width/height of the window including border. /// Cached width/height of the window including border.
int widthb, heightb; int widthb, heightb;
/// Whether the window is being destroyed. This being true means destroy_win
/// is called, but window might still need to be faded out
bool destroying;
/// Whether the window is bounding-shaped. /// Whether the window is bounding-shaped.
bool bounding_shaped; bool bounding_shaped;
/// Whether the window just have rounded corners. /// Whether the window just have rounded corners.