From 51858956438bfa234c65758b01edc3ba5fb480e6 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sun, 25 Sep 2022 21:45:20 +0200 Subject: [PATCH] [window] Check bitmask, not full comparison --- source/modes/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/modes/window.c b/source/modes/window.c index c8690212..a0e3d136 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -294,7 +294,7 @@ window_get_attributes(xcb_window_t w) { // _NET_WM_STATE_* static int client_has_state(client *c, xcb_atom_t state) { for (int i = 0; i < c->states; i++) { - if (c->state[i] == state) { + if ((c->state[i] & state) == state) { return 1; } }