From fb861c2f05e5f49f4009d0d7c91101259f904f1d Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Mon, 3 Dec 2018 20:22:40 +0900 Subject: Emit events to application not subscriber This patch change Window Manager emits event to application such as syncDraw not to subscribers. Bug-AGL: SPEC-1999 Change-Id: Ie2699c1180b4f37f6333933db9f11eaa7ed8f683 Signed-off-by: Kazumasa Mitsunari --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 333df70..cc4386c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -431,10 +431,10 @@ void windowmanager_wm_subscribe(afb_req_t req) noexcept afb_req_fail(req, "failed", "Need char const* argument event"); return; } - int event_id = json_object_get_int(j); - int ret = g_afb_instance->wmgr.api_subscribe(req, event_id); + wm::WindowManager::EventType event_id = (wm::WindowManager::EventType)json_object_get_int(j); + bool ret = g_afb_instance->wmgr.api_subscribe(req, event_id); - if (ret) + if (!ret) { afb_req_fail(req, "failed", "Error: afb_req_subscribe()"); return; -- cgit 1.2.3-korg