From 5ac52dc6412f8311b6cfbd0e99652c914d5c6168 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 25 May 2018 11:17:55 +0900 Subject: [Local]:5th step for blocking sequence Change-Id: Ic47c59a77d3b45f62bed8ee2617dddc4ed58afbe Signed-off-by: Kazumasa Mitsunari --- src/windowmanager-client.cpp | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'src/windowmanager-client.cpp') diff --git a/src/windowmanager-client.cpp b/src/windowmanager-client.cpp index 876ab9f..bc24978 100644 --- a/src/windowmanager-client.cpp +++ b/src/windowmanager-client.cpp @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +#include // for debug +using std::cerr;//debug +using std::cout;//debug +using std::endl;//debug #include "windowmanager-client.hpp" namespace wm { @@ -21,27 +24,42 @@ namespace wm { using std::string; const std::vector wm_events = { + // Private event for applications "syncDraw", "flushDraw", "visible", "invisible", "active", "inactive" }; WMClient::WMClient(const string &appid, unsigned layerID, unsigned surfaceID, const string &role) :id(appid), - layer(layerID) + layer(layerID), + roles(0), + surfaces(0) { roles.push_back(role); surfaces.push_back(surfaceID); for(auto x: wm_events){ +#if GTEST_ENABLED + string ev = x; +#else afb_event ev = afb_daemon_make_event(x.c_str()); +#endif event_list[x] = ev; } } WMClient::WMClient(const string &appid, const string &role) - :id(appid) + : id(appid), + layer(0), + roles(0), + surfaces(0), + event_list(0) { roles.push_back(role); for(auto x: wm_events){ +#if GTEST_ENABLED + string ev = x; +#else afb_event ev = afb_daemon_make_event(x.c_str()); +#endif event_list[x] = ev; } } @@ -49,12 +67,8 @@ WMClient::WMClient(const string &appid, const string &role) WMClient::~WMClient(){ } -/* const std::vector> surfaceIDList(){ - +string WMClient::appID(){ + return this->id; } -std::optional surfaceID(role); - -} */ - } \ No newline at end of file -- cgit 1.2.3-korg