summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2022-09-25 21:45:20 +0200
committerDave Davenport <qball@blame.services>2022-09-25 21:45:51 +0200
commit51858956438bfa234c65758b01edc3ba5fb480e6 (patch)
treea2c916d3705afc79504a5955334499a9f8d640f0
parent5ae8fa5a3f691a0753d7f612ae2b07add7881d4d (diff)
[window] Check bitmask, not full comparison
-rw-r--r--source/modes/window.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}