Fix build error
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Fri, 31 Aug 2018 00:26:45 +0000 (09:26 +0900)
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Fri, 31 Aug 2018 00:26:45 +0000 (09:26 +0900)
Change-Id: Ifa4052b2d076a3b05bf937a6e2aaf2a7d79ebc13
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
src/request.hpp
src/wm_layer_control.cpp
src/wm_layer_control.hpp

index 84973de..95b8c82 100644 (file)
@@ -24,6 +24,8 @@
 namespace wm
 {
 
+class WMClient;
+
 enum Task
 {
     TASK_ALLOCATE,
@@ -53,7 +55,7 @@ struct WMAction
     std::string area;
     TaskVisible visible;
     bool end_draw_finished;
-    std::shared_ptr<WMAction> client;
+    std::shared_ptr<WMClient> client;
     unsigned req_num;
 };
 
index 3f39d65..9ac1ffc 100644 (file)
@@ -27,6 +27,7 @@
 \r
 using std::string;\r
 using std::vector;\r
+using std::shared_ptr;\r
 \r
 namespace wm {\r
 \r
@@ -358,11 +359,11 @@ WMError LayerControl::visibilityChange(const WMAction& action)
 \r
     if (action.visible != TaskVisible::INVISIBLE)\r
     {\r
-        ret = this->makeVisible(action.client.get());\r
+        ret = this->makeVisible(action.client);\r
     }\r
     else\r
     {\r
-        ret = this->makeInvisible(action.client.get());\r
+        ret = this->makeInvisible(action.client);\r
     }\r
     return ret;\r
 }\r
@@ -525,7 +526,7 @@ void LayerControl::dispatchPropertyChangeEvent(unsigned id,
     }\r
 }\r
 \r
-WMError LayerControl::makeVisible(const WMClient* client)\r
+WMError LayerControl::makeVisible(const shared_ptr<WMClient> client)\r
 {\r
     WMError ret = WMError::FAIL;\r
     // Don't check here the client is not nullptr\r
@@ -533,7 +534,7 @@ WMError LayerControl::makeVisible(const WMClient* client)
     bool contains;// = this->checkBackGround(action.client->role());\r
     if(contains)\r
     {\r
-        std::shared_ptr<WMLayer> l;\r
+        shared_ptr<WMLayer> l;\r
         // Move background from back ground layer\r
         for(const auto& wm_layer : this->wm_layers)\r
         {\r
@@ -566,7 +567,7 @@ WMError LayerControl::makeVisible(const WMClient* client)
     return ret;\r
 }\r
 \r
-WMError LayerControl::makeInvisible(const WMClient* client)\r
+WMError LayerControl::makeInvisible(const shared_ptr<WMClient> client)\r
 {\r
     WMError ret = WMError::FAIL;\r
     // Don't check here the client is not nullptr\r
index ea122a3..e2c4b18 100644 (file)
@@ -84,8 +84,8 @@ class LayerControl
     void dispatchPropertyChangeEvent(unsigned id, struct ilmSurfaceProperties*, t_ilm_notification_mask);\r
     void dispatchPropertyChangeEvent(unsigned id, struct ilmLayerProperties*, t_ilm_notification_mask);\r
   private:\r
-    WMError makeVisible(const WMClient* client);\r
-    WMError makeInvisible(const WMClient* client);\r
+    WMError makeVisible(const std::shared_ptr<WMClient> client);\r
+    WMError makeInvisible(const std::shared_ptr<WMClient> client);\r
     WMError loadLayerSetting(const std::string& path);\r
     WMError loadAreaDb(const std::string& path);\r
 \r