Fix output debug message
[apps/agl-service-windowmanager.git] / src / window_manager.cpp
index acf3b76..dec7752 100644 (file)
@@ -172,6 +172,9 @@ int WindowManager::init()
     lmcb.surfaceCreated = [&](unsigned pid, unsigned surface){
         this->surface_created(surface);
         };
+    lmcb.surfaceDestroyed = [&](unsigned surface){
+        this->surface_removed(surface);
+    };
     this->lc->init(lmcb);
     this->loadOldRoleDb();
 
@@ -741,7 +744,7 @@ void WindowManager::surface_created(uint32_t surface_id)
         {
             auto client = g_app_list.lookUpClient(appid);
             WMError ret = client->addSurface(surface_id);
-            HMI_INFO("Add surface %d to \"%s\"", appid.c_str());
+            HMI_INFO("Add surface %d to \"%s\"", surface_id, appid.c_str());
             if(ret != WMError::SUCCESS)
             {
                 HMI_ERROR("Failed to add surface to client %s", client->appID().c_str());
@@ -1324,7 +1327,7 @@ WMError WindowManager::startTransition(unsigned req_num)
                 //this->deactivate(client->surfaceID(x.role));
             } */
         }
-        this->lc->commitChange();
+        this->lc->renderLayers();
         ret = WMError::NO_LAYOUT_CHANGE;
     }
     return ret;
@@ -1368,7 +1371,7 @@ WMError WindowManager::doEndDraw(unsigned req_num)
             //this->lc_enddraw(act.role.c_str());
         }
     }
-    this->lc->commitChange();
+    this->lc->renderLayers();
 
     HMI_SEQ_INFO(req_num, "emit flushDraw");