aboutsummaryrefslogtreecommitdiffstats
path: root/src/windowmanager-client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/windowmanager-client.cpp')
-rw-r--r--src/windowmanager-client.cpp32
1 files changed, 23 insertions, 9 deletions
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 <iostream> // 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<std::string> 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<optional<unsigned>> surfaceIDList(){
-
+string WMClient::appID(){
+ return this->id;
}
-std::optional<unsigned> surfaceID(role);
-
-} */
-
} \ No newline at end of file