diff options
-rw-r--r-- | AFBClient.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/AFBClient.cpp b/AFBClient.cpp index 6a57310..283e22c 100644 --- a/AFBClient.cpp +++ b/AFBClient.cpp @@ -67,7 +67,7 @@ int AFBClient::requestSurface(const char *label) bool is_not_set; }; - constexpr struct optional nullopt = {0, true}; + constexpr struct optional const nullopt = {0, true}; auto id = nullopt; /* send the request */ @@ -139,12 +139,20 @@ int AFBClient::dispatch(uint64_t timeout) { void AFBClient::deactivateSurface(const char *label) { - UNUSED(label); + json_object *j = json_object_new_object(); + json_object_object_add(j, "drawing_name", json_object_new_string(label)); + call(AFBClient::wmAPI, "deactivate_surface", json_object_to_json_string(j)); + json_object_put(j); + dispatch(-1); } void AFBClient::endDraw(const char *label) { - UNUSED(label); + json_object *j = json_object_new_object(); + json_object_object_add(j, "drawing_name", json_object_new_string(label)); + call(AFBClient::wmAPI, "enddraw", json_object_to_json_string(j)); + json_object_put(j); + dispatch(-1); } /* called when wsj1 receives a method invocation */ |