diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-09-08 20:59:51 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-09-08 20:59:51 +0900 |
commit | b1f017ed5a12ab2dd305133c8c7f28deb3218a69 (patch) | |
tree | 1bceea1ded0846baaa02da7f21080a41cb4b7999 /src | |
parent | 343b17472d8b6b18e89731961337f04c4033832c (diff) |
Add callback function when surface dead
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/window_manager.cpp | 3 | ||||
-rw-r--r-- | src/wm_layer_control.cpp | 2 | ||||
-rw-r--r-- | src/wm_layer_control.hpp | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp index acf3b76..6818438 100644 --- a/src/window_manager.cpp +++ b/src/window_manager.cpp @@ -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(); diff --git a/src/wm_layer_control.cpp b/src/wm_layer_control.cpp index 4519922..813e4ab 100644 --- a/src/wm_layer_control.cpp +++ b/src/wm_layer_control.cpp @@ -408,7 +408,7 @@ void LayerControl::dispatchCreateEvent(ilmObjectType object, unsigned id, bool c } else { - // this->cb->surfaceDestroyed(id); + this->cb.surfaceDestroyed(id); } } if (ILM_LAYER == object) diff --git a/src/wm_layer_control.hpp b/src/wm_layer_control.hpp index 503ec3b..f637d8d 100644 --- a/src/wm_layer_control.hpp +++ b/src/wm_layer_control.hpp @@ -45,6 +45,7 @@ class LayerControlCallbacks { // callback functions std::function<void(unsigned, unsigned)> surfaceCreated; + std::function<void(unsigned)> surfaceDestroyed; /* std::function<void(unsigned)> surfaceDestroyed; std::function<void(unsigned)> layerCreated; std::function<void(unsigned)> layerDestroyed; */ |