summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2019-03-04 12:45:51 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2019-03-06 11:38:48 +0900
commitd89d03ba2705a3597a5b7c7f4abab65af8db6a17 (patch)
treed3bbfb3969397a65fac14396cf6fc0eb61bded19
parent1fc523e117a23961ad47001424de2fb42176c565 (diff)
Remove checking the role application requestedsandbox/knimitz/remove_check_the_role
Remove checking the role application requested when event comes from windowmanager-servece. That was required when the role parameter in event was used for filtering by client side. windowmanager-service changed not emitting events to global but emitting to application. So those checking is not necessary. Bug-AGL: SPEC-2155 Change-Id: I11c06460e2a307d0abb50bf30333d08e65084b4e Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/libwindowmanager.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp
index 8e523b2..87a3988 100644
--- a/src/libwindowmanager.cpp
+++ b/src/libwindowmanager.cpp
@@ -838,19 +838,14 @@ void LibWindowmanager::Impl::event(char const *et, json_object *object) {
}
json_object *j_val;
std::string role = "";
- bool emit = false;
if(json_object_object_get_ex(object, g_kKeyDrawingName, &j_val)) {
role = json_object_get_string(j_val);
}
- if (this->labels.find(role) != this->labels.end()){
- emit = true;
- }
switch(oet.second) {
case Event_Active :
case Event_Inactive : {
bool active = ((oet.second == Event_Active) ? true : false);
- if(!emit) break;
if(this->_wmh.on_active) {
return this->_wmh.on_active(role.c_str(), active);
}
@@ -859,14 +854,13 @@ void LibWindowmanager::Impl::event(char const *et, json_object *object) {
case Event_Visible :
case Event_Invisible : {
bool visible = ((oet.second == Event_Visible) ? true : false);
- if(!emit) break;
if(this->_wmh.on_visible) {
return this->_wmh.on_visible(role.c_str(), visible);
}
break;
}
case Event_SyncDraw :
- if(this->_wmh.on_sync_draw && emit) {
+ if(this->_wmh.on_sync_draw) {
json_object_object_get_ex(object, g_kKeyDrawingArea, &j_val);
const char* area = json_object_get_string(j_val);
json_object *j_rect;
@@ -884,7 +878,7 @@ void LibWindowmanager::Impl::event(char const *et, json_object *object) {
}
break;
case Event_FlushDraw :
- if(this->_wmh.on_flush_draw && emit) {
+ if(this->_wmh.on_flush_draw) {
return this->_wmh.on_flush_draw(role.c_str());
}
break;
@@ -908,19 +902,7 @@ void LibWindowmanager::Impl::event(char const *et, json_object *object) {
auto i = this->handlers.find(oet.second);
if (i != this->handlers.end()) {
- json_object *val;
- const char *label;
- if (json_object_object_get_ex(object, g_kKeyDrawingName, &val)) {
- label = json_object_get_string(val);
- }
- else {
- i->second(object);
- return;
- }
-
- if (this->labels.find(label) != this->labels.end()) {
- i->second(object);
- }
+ i->second(object);
}
}