From c5ff198995f6f50afcc2edf326f66e212f81ae49 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Mon, 19 Nov 2018 15:35:52 +0900 Subject: fix restriction issue --- src/libhomescreen.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/libhomescreen.cpp b/src/libhomescreen.cpp index 9689863..153c131 100644 --- a/src/libhomescreen.cpp +++ b/src/libhomescreen.cpp @@ -600,7 +600,7 @@ void LibHomeScreen::on_event(void *closure, const char *event, struct afb_wsj1_m } if (strcasecmp(event_type, LibHomeScreen::event_list[0].c_str()) == 0) { - auto i = this->handlers.find(Event_TapShortcut); + auto i = this->handlers.find(Event_ShowWindow); if ( i != this->handlers.end() ) { i->second(json_data); } @@ -617,6 +617,18 @@ void LibHomeScreen::on_event(void *closure, const char *event, struct afb_wsj1_m i->second(json_data); } } + else if (strcasecmp(event_type, LibHomeScreen::event_list[3].c_str()) == 0) { + auto i = this->handlers.find(Event_AllocateRestriction); + if ( i != this->handlers.end() ) { + i->second(json_data); + } + } + else if (strcasecmp(event_type, LibHomeScreen::event_list[4].c_str()) == 0) { + auto i = this->handlers.find(Event_ReleaseRestriction); + if ( i != this->handlers.end() ) { + i->second(json_data); + } + } } /** -- cgit 1.2.3-korg