App/API: fix event emission methods
[staging/windowmanager.git] / src / app.cpp
index 6d47928..b8d3a86 100644 (file)
@@ -464,19 +464,23 @@ void App::surface_removed(uint32_t surface_id) {
 }
 
 void App::emit_activated(char const *label) {
-   this->api.send_event("activated", json_object_new_string(label));
+   this->api.send_event("activated", label);
 }
 
 void App::emit_deactivated(char const *label) {
-   this->api.send_event("deactivated", json_object_new_string(label));
+   this->api.send_event("deactivated", label);
 }
 
 void App::emit_syncdraw(char const *label) {
-   this->api.send_event("syncdraw", json_object_new_string(label));
+   this->api.send_event("syncdraw", label);
+}
+
+void App::emit_flushdraw(char const *label) {
+   this->api.send_event("syncdraw", label);
 }
 
 void App::emit_visible(char const *label, bool is_visible) {
-   this->api.send_event(is_visible ? "visible" : "invisible", json_object_new_string(label));
+   this->api.send_event(is_visible ? "visible" : "invisible", label);
 }
 
 result<int> App::request_surface(char const *drawing_name) {