doc: shuffled around some sections, fixes.
[staging/windowmanager.git] / src / app.cpp
index 240c7e4..ac70489 100644 (file)
@@ -39,7 +39,6 @@
 namespace wm {
 
 namespace {
-App *g_app;
 
 using nlohmann::json;
 
@@ -84,9 +83,6 @@ App::App(wl::display *d)
      id_alloc{},
      pending_events(false),
      policy{} {
-   assert(g_app == nullptr);
-   g_app = this;
-
    try {
       {
          auto l = load_layer_map(
@@ -102,8 +98,6 @@ App::App(wl::display *d)
    }
 }
 
-App::~App() { g_app = nullptr; }
-
 int App::init() {
    if (!this->display->ok()) {
       return -1;
@@ -623,11 +617,11 @@ void App::surface_removed(uint32_t surface_id) {
 }
 
 void App::emit_activated(char const *label) {
-   this->api.send_event("activated", label);
+   this->api.send_event("active", label);
 }
 
 void App::emit_deactivated(char const *label) {
-   this->api.send_event("deactivated", label);
+   this->api.send_event("inactive", label);
 }
 
 void App::emit_syncdraw(char const *label) {