aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-27 18:34:05 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-11-27 18:34:05 +0100
commit972c0f2fba84b6011328c685142172f51dd271a8 (patch)
tree9d1ffc427b8e06a91342d3d82057271bba7dce83
parent6ad2b0aa0196b3883a8102c97bb9eaa8d77f8de8 (diff)
Activate by default xdg apps
Change-Id: I9acd2205d0cd171a82732e511493eb486dc34bb2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--src/app.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/app.cpp b/src/app.cpp
index fcdda1f..ddb2182 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -607,10 +607,10 @@ void App::surface_created(uint32_t surface_id) {
this->layers.add_surface(surface_id, *layer_id);
// set the main_surface[_name] here and now
- if (!this->layers.main_surface_name.empty() &&
- this->layers.main_surface_name == XDG_DRAWING_NAME) {
- this->layers.main_surface = surface_id;
- HMI_DEBUG("wm", "Set main_surface id to %u", surface_id);
+ if (this->layers.main_surface_name.empty()) {
+ this->layers.main_surface_name == XDG_DRAWING_NAME;
+ this->layers.main_surface = surface_id;
+ HMI_DEBUG("wm", "Set main_surface id to %u", surface_id);
}
}
@@ -619,13 +619,15 @@ void App::surface_created(uint32_t surface_id) {
this->controller->layers[*layer_id]->add_surface(
this->controller->surfaces[surface_id].get());
- // activate the main_surface right away
- /*if (surface_id == static_cast<unsigned>(this->layers.main_surface)) {
- HMI_DEBUG("wm", "Activating main_surface (%d)", surface_id);
+ if(this->layers.main_surface_name == XDG_DRAWING_NAME) {
+ // activate the main_surface right away
+ if (surface_id == static_cast<unsigned>(this->layers.main_surface)) {
+ HMI_DEBUG("wm", "Activating main_surface (%d)", surface_id);
- this->api_activate_surface(
- this->lookup_name(surface_id).value_or("unknown-name").c_str());
- }*/
+ this->api_activate_surface(
+ this->lookup_name(surface_id).value_or("unknown-name").c_str());
+ }
+ }
}
void App::surface_removed(uint32_t surface_id) {