aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/request.hpp4
-rw-r--r--src/wm_layer_control.cpp11
-rw-r--r--src/wm_layer_control.hpp4
3 files changed, 11 insertions, 8 deletions
diff --git a/src/request.hpp b/src/request.hpp
index 84973de..95b8c82 100644
--- a/src/request.hpp
+++ b/src/request.hpp
@@ -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;
};
diff --git a/src/wm_layer_control.cpp b/src/wm_layer_control.cpp
index 3f39d65..9ac1ffc 100644
--- a/src/wm_layer_control.cpp
+++ b/src/wm_layer_control.cpp
@@ -27,6 +27,7 @@
using std::string;
using std::vector;
+using std::shared_ptr;
namespace wm {
@@ -358,11 +359,11 @@ WMError LayerControl::visibilityChange(const WMAction& action)
if (action.visible != TaskVisible::INVISIBLE)
{
- ret = this->makeVisible(action.client.get());
+ ret = this->makeVisible(action.client);
}
else
{
- ret = this->makeInvisible(action.client.get());
+ ret = this->makeInvisible(action.client);
}
return ret;
}
@@ -525,7 +526,7 @@ void LayerControl::dispatchPropertyChangeEvent(unsigned id,
}
}
-WMError LayerControl::makeVisible(const WMClient* client)
+WMError LayerControl::makeVisible(const shared_ptr<WMClient> client)
{
WMError ret = WMError::FAIL;
// Don't check here the client is not nullptr
@@ -533,7 +534,7 @@ WMError LayerControl::makeVisible(const WMClient* client)
bool contains;// = this->checkBackGround(action.client->role());
if(contains)
{
- std::shared_ptr<WMLayer> l;
+ shared_ptr<WMLayer> l;
// Move background from back ground layer
for(const auto& wm_layer : this->wm_layers)
{
@@ -566,7 +567,7 @@ WMError LayerControl::makeVisible(const WMClient* client)
return ret;
}
-WMError LayerControl::makeInvisible(const WMClient* client)
+WMError LayerControl::makeInvisible(const shared_ptr<WMClient> client)
{
WMError ret = WMError::FAIL;
// Don't check here the client is not nullptr
diff --git a/src/wm_layer_control.hpp b/src/wm_layer_control.hpp
index ea122a3..e2c4b18 100644
--- a/src/wm_layer_control.hpp
+++ b/src/wm_layer_control.hpp
@@ -84,8 +84,8 @@ class LayerControl
void dispatchPropertyChangeEvent(unsigned id, struct ilmSurfaceProperties*, t_ilm_notification_mask);
void dispatchPropertyChangeEvent(unsigned id, struct ilmLayerProperties*, t_ilm_notification_mask);
private:
- WMError makeVisible(const WMClient* client);
- WMError makeInvisible(const WMClient* client);
+ WMError makeVisible(const std::shared_ptr<WMClient> client);
+ WMError makeInvisible(const std::shared_ptr<WMClient> client);
WMError loadLayerSetting(const std::string& path);
WMError loadAreaDb(const std::string& path);