From fa08aaf93eaaa6f09cbb325d6624b5dfb72fbbdc Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 13 Jul 2018 11:22:50 +0900 Subject: Bug fix: Enable screenUpdated and error event This patch fixes the bug that application can't get the screenUpdated and error events. Bug-AGL: SPEC-1532 Change-Id: I260179916ea487faf761c40efc473ae415707050 Signed-off-by: Kazumasa Mitsunari --- src/libwindowmanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp index 02ab965..5f0f5e5 100644 --- a/src/libwindowmanager.cpp +++ b/src/libwindowmanager.cpp @@ -569,7 +569,7 @@ void LibWindowmanager::Impl::set_event_handler(enum EventType et, handler_fun fu } // Set event handler - if (et >= Event_Active && et <= Event_FlushDraw) { + if (et >= Event_Active && et <= Event_Val_Max) { this->handlers[et] = std::move(func); } } @@ -596,6 +596,8 @@ std::pair make_event_type(char const *et) { ET("invisible", Invisible); ET("syncdraw", SyncDraw); ET("flushdraw", FlushDraw); + ET("screenUpdated", ScreenUpdated); + ET("error", Error); #undef ET return std::pair(false, @@ -686,7 +688,7 @@ void LibWindowmanager::Impl::event(char const *et, json_object *object) { label = json_object_get_string(val); } else { - HMI_ERROR("libwm", "Not found key \"%s\"\n", this->kKeyDrawingName); + i->second(object); return; } -- cgit 1.2.3-korg