aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-05 12:12:51 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-05 12:13:32 +0200
commit76fb6aef7ca4cf8f922a1076eaafef3c19e3fd07 (patch)
tree6d690235275f2eac3e650d496c99c7b0b10bd8ba
parent28ea1b5c23d2814e32ad133ba833d87f73522087 (diff)
App: be a little more thorough when activating a surface
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--src/app.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 26dc5f6..f76ebbd 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -386,7 +386,8 @@ char const *App::activate_surface(char const *drawing_name) {
// Set all others invisible
for (auto &i : this->controller->surfaces) {
auto &si = this->controller->sprops[i.second->id];
- if (si.visibility != 0 && int(si.id) != this->layers.main_surface) {
+ if (si.visibility != 0 &&
+ int(si.id) != this->layers.main_surface) {
this->deactivate(i.second->id);
}
}
@@ -526,6 +527,7 @@ binding_api::result_type binding_api::activate_surface(
logdebug("%s drawing_name %s", __func__, drawing_name);
auto r = this->app->activate_surface(drawing_name);
if (r != nullptr) {
+ logdebug("%s failed with error: %s", __func__, r);
return Err<json_object *>(r);
}
return Ok(json_object_new_object());
@@ -535,6 +537,7 @@ binding_api::result_type binding_api::deactivate_surface(char const* drawing_nam
logdebug("%s drawing_name %s", __func__, drawing_name);
auto r = this->app->deactivate_surface(drawing_name);
if (r != nullptr) {
+ logdebug("%s failed with error: %s", __func__, r);
return Err<json_object *>(r);
}
return Ok(json_object_new_object());