summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-10-31 14:00:23 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-14 13:32:34 +0000
commit101b535c71b6055bb35884b606e4a978d2ce2599 (patch)
tree50368794091d946c876fd4f2ef98681d7825a3b9 /app/main.cpp
parente3422a47c3badc5c8f3f09e047c8a881debb6bf1 (diff)
Remove debug messages
Change-Id: I465e3ed3e4cb6dadd808437133bddb56ed50c72e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index ca527e6..7722a0a 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -68,9 +68,11 @@ int main(int argc, char *argv[])
if(qwm->init(port,secret) != 0){
exit(EXIT_FAILURE);
}
+ // Request a surface as described in layers.json windowmanager’s file
if (qwm->requestSurface(json_object_new_string(myname.c_str())) != 0) {
exit(EXIT_FAILURE);
}
+ // Create an event callback against an event type. Here a lambda is called when SyncDraw event occurs
qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, [qwm, myname](json_object *object) {
fprintf(stderr, "Surface got syncDraw!\n");
qwm->endDraw(json_object_new_string(myname.c_str()));
@@ -78,6 +80,7 @@ int main(int argc, char *argv[])
// HomeScreen
hs->init(port, token.c_str());
+ // Set the event handler for Event_TapShortcut which will activate the surface for windowmanager
hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [qwm, myname](json_object *object){
qDebug("object %s", json_object_to_json_string(object));
json_object *appnameJ = nullptr;