Commit 2bb01093 authored by Max Kellermann's avatar Max Kellermann

Idle: don't wake up event loop on duplicate event

parent 36c814d2
......@@ -52,9 +52,10 @@ idle_add(unsigned flags)
{
assert(flags != 0);
idle_flags |= flags;
unsigned old_flags = idle_flags.fetch_or(flags);
GlobalEvents::Emit(GlobalEvents::IDLE);
if ((old_flags & flags) != flags)
GlobalEvents::Emit(GlobalEvents::IDLE);
}
unsigned
......
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