From 973a7123c0bced7c7e7d9dc6dc5e990a0e2838ac Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Sun, 20 May 2018 23:08:13 +0900 Subject: [Local]: Lock Sequence from activateSurface to flushDraw Signed-off-by: Kazumasa Mitsunari --- src/windowmanager-client.cpp | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'src/windowmanager-client.cpp') diff --git a/src/windowmanager-client.cpp b/src/windowmanager-client.cpp index 512f271..876ab9f 100644 --- a/src/windowmanager-client.cpp +++ b/src/windowmanager-client.cpp @@ -18,18 +18,39 @@ namespace wm { -WMClient::WMClient(){ +using std::string; +const std::vector wm_events = { + "syncDraw", "flushDraw", "visible", "invisible", "active", "inactive" +}; + +WMClient::WMClient(const string &appid, unsigned layerID, unsigned surfaceID, const string &role) + :id(appid), + layer(layerID) +{ + roles.push_back(role); + surfaces.push_back(surfaceID); + for(auto x: wm_events){ + afb_event ev = afb_daemon_make_event(x.c_str()); + event_list[x] = ev; + } } -WMClient::WMClient(const char* appid, unsigned layerID, unsigned surfaceID, const char* role) - : request_number(0) +WMClient::WMClient(const string &appid, const string &role) + :id(appid) { + roles.push_back(role); + for(auto x: wm_events){ + afb_event ev = afb_daemon_make_event(x.c_str()); + event_list[x] = ev; + } +} +WMClient::~WMClient(){ } /* const std::vector> surfaceIDList(){ - + } std::optional surfaceID(role); -- cgit 1.2.3-korg