From 84ab55d730a4268e3477f01f20b7f60571c56586 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 4 Dec 2020 01:07:44 +0000 Subject: [PATCH] win: fix win_is_real_visible Forgot to negate the expression. Signed-off-by: Yuxuan Shui --- src/win.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win.c b/src/win.c index 5cec8a8..730f673 100644 --- a/src/win.c +++ b/src/win.c @@ -127,8 +127,8 @@ static inline xcb_window_t win_get_leader(session_t *ps, struct managed_win *w) * cached version of the window is displayed. */ static inline bool attr_pure win_is_real_visible(const struct managed_win *w) { - return w->state == WSTATE_UNMAPPED || w->state == WSTATE_DESTROYING || - w->state == WSTATE_UNMAPPING; + return w->state != WSTATE_UNMAPPED && w->state != WSTATE_DESTROYING && + w->state != WSTATE_UNMAPPING; } /** @@ -442,7 +442,7 @@ void win_process_update_flags(session_t *ps, struct managed_win *w) { win_clear_flags(w, WIN_FLAGS_MAPPED); } - if (win_is_real_visible(w)) { + if (!win_is_real_visible(w)) { // Flags of invisible windows are processed when they are mapped return; }