Merge "Fix build error in gcc 7.2"
[apps/agl-service-windowmanager.git] / src / app.cpp
index bf84b22..d218f3e 100644 (file)
@@ -628,7 +628,7 @@ void App::surface_created(uint32_t surface_id) {
 
    this->controller->layers[*layer_id]->add_surface(
       this->controller->surfaces[surface_id].get());
-
+   this->layout_commit();
    // 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);
@@ -735,6 +735,7 @@ char const *App::api_request_surface(char const *drawing_name,
 
    this->controller->layers[*lid]->add_surface(
        this->controller->surfaces[sid].get());
+   this->layout_commit();
 
    return nullptr;
 }
@@ -751,6 +752,7 @@ void App::activate(int id) {
       // FOR CES DEMO >>>
       if ((0 == strcmp(label, "Radio"))
           || (0 == strcmp(label, "MediaPlayer"))
+          || (0 == strcmp(label, "Music"))
           || (0 == strcmp(label, "Navigation"))) {
         for (auto i = surface_bg.begin(); i != surface_bg.end(); ++i) {
             if (id == *i) {
@@ -790,6 +792,7 @@ void App::deactivate(int id) {
       // FOR CES DEMO >>>
       if ((0 == strcmp(label, "Radio"))
           || (0 == strcmp(label, "MediaPlayer"))
+          || (0 == strcmp(label, "Music"))
           || (0 == strcmp(label, "Navigation"))) {
 
          // Store id