GlobalEvents: expose the internal class

Move the GlobalEvents::Monitor instance into class Instance.
Eliminate all global variables.
This commit is contained in:
Max Kellermann
2016-03-05 20:14:12 +01:00
parent b4d594eeff
commit 0e87ce4680
7 changed files with 38 additions and 58 deletions

View File

@@ -24,7 +24,8 @@
#include "config.h"
#include "Idle.hxx"
#include "GlobalEvents.hxx"
#include "Main.hxx"
#include "Instance.hxx"
#include "util/ASCII.hxx"
#include <atomic>
@@ -58,7 +59,7 @@ idle_add(unsigned flags)
unsigned old_flags = idle_flags.fetch_or(flags);
if ((old_flags & flags) != flags)
GlobalEvents::Emit(GlobalEvents::IDLE);
instance->global_events.Emit(GlobalEvents::IDLE);
}
unsigned