Change WMClient to go to layer model
[apps/agl-service-windowmanager-2017.git] / src / window_manager.cpp
index 0eebbff..beb8eac 100644 (file)
@@ -434,14 +434,14 @@ void WindowManager::api_activate_surface(char const *appid, char const *drawing_
     }
     auto client = g_app_list.lookUpClient(id);
 
-    unsigned srfc = client->surfaceID(role);
+    unsigned srfc = client->surfaceID();
     if(srfc == 0)
     {
         HMI_ERROR("wm", "role sould be set with surface");
         reply("role sould be set with surface");
         return;
     }
-    g_app_list.removeFloatingSurface(client->surfaceID(role));
+    g_app_list.removeFloatingSurface(client->surfaceID());
 
     Task task = Task::TASK_ALLOCATE;
     unsigned req_num = 0;
@@ -1239,7 +1239,7 @@ WMError WindowManager::startTransition(unsigned req_num)
             if (g_app_list.contains(x.appid))
             {
                 auto client = g_app_list.lookUpClient(x.appid);
-                this->deactivate(client->surfaceID(x.role));
+                this->deactivate(client->surfaceID());
             }
         }
         ret = NO_LAYOUT_CHANGE;
@@ -1467,7 +1467,7 @@ WMError WindowManager::layoutChange(const WMAction &action)
         return WMError::SUCCESS;
     }
     auto client = g_app_list.lookUpClient(action.appid);
-    unsigned surface = client->surfaceID(action.role);
+    unsigned surface = client->surfaceID();
     if (surface == 0)
     {
         HMI_SEQ_ERROR(g_app_list.currentRequestNumber(),
@@ -1486,7 +1486,7 @@ WMError WindowManager::visibilityChange(const WMAction &action)
         return WMError::NOT_REGISTERED;
     }
     auto client = g_app_list.lookUpClient(action.appid);
-    unsigned surface = client->surfaceID(action.role);
+    unsigned surface = client->surfaceID();
     if(surface == 0)
     {
         HMI_SEQ_ERROR(g_app_list.currentRequestNumber(),
@@ -1533,7 +1533,7 @@ WMError WindowManager::changeCurrentState(unsigned req_num)
             return WMError::NOT_REGISTERED;
         }
         auto client = g_app_list.lookUpClient(action.appid);
-        auto pCurState = *this->layers.get_layout_state((int)client->surfaceID(action.role));
+        auto pCurState = *this->layers.get_layout_state((int)client->surfaceID());
         if(pCurState == nullptr)
         {
             HMI_SEQ_ERROR(req_num, "Counldn't find current status");
@@ -1547,7 +1547,7 @@ WMError WindowManager::changeCurrentState(unsigned req_num)
     for (const auto &action : actions)
     {
         auto client = g_app_list.lookUpClient(action.appid);
-        auto pLayerCurState = *this->layers.get_layout_state((int)client->surfaceID(action.role));
+        auto pLayerCurState = *this->layers.get_layout_state((int)client->surfaceID());
         if (pLayerCurState == nullptr)
         {
             HMI_SEQ_ERROR(req_num, "Counldn't find current status");
@@ -1557,7 +1557,7 @@ WMError WindowManager::changeCurrentState(unsigned req_num)
 
         if (action.visible != TaskVisible::INVISIBLE)
         {
-            surface = (int)client->surfaceID(action.role);
+            surface = (int)client->surfaceID();
             HMI_SEQ_INFO(req_num, "Change %s surface : %d, state visible area : %s",
                             action.role.c_str(), surface, action.area.c_str());
             // visible == true -> layout changes