Commit d096f75f authored by Max Kellermann's avatar Max Kellermann

client/Idle: apply idle_subscriptions mask once

parent 854424a7
...@@ -29,12 +29,12 @@ Client::IdleNotify() noexcept ...@@ -29,12 +29,12 @@ Client::IdleNotify() noexcept
assert(idle_waiting); assert(idle_waiting);
assert(idle_flags != 0); assert(idle_flags != 0);
unsigned flags = std::exchange(idle_flags, 0); unsigned flags = std::exchange(idle_flags, 0) & idle_subscriptions;
idle_waiting = false; idle_waiting = false;
const char *const*idle_names = idle_get_names(); const char *const*idle_names = idle_get_names();
for (unsigned i = 0; idle_names[i]; ++i) { for (unsigned i = 0; idle_names[i]; ++i) {
if (flags & (1 << i) & idle_subscriptions) if (flags & (1 << i))
client_printf(*this, "changed: %s\n", client_printf(*this, "changed: %s\n",
idle_names[i]); idle_names[i]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment