diff options
Diffstat (limited to 'src/windowmanager-client.cpp')
-rw-r--r-- | src/windowmanager-client.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
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<std::string> 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<optional<unsigned>> surfaceIDList(){ - + } std::optional<unsigned> surfaceID(role); |