summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libwindowmanager.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp
index efa9721..57e4c04 100644
--- a/src/libwindowmanager.cpp
+++ b/src/libwindowmanager.cpp
@@ -263,24 +263,14 @@ int LibWindowmanager::Impl::requestSurface(json_object *object) {
this->api_call("RequestSurface", object, [&rc](bool ok, json_object *j) {
if (ok) {
json_object *val;
- int id;
if (json_object_object_get_ex(j, "response", &val)) {
- id = json_object_get_int(val);
+ rc = json_object_get_int(val);
}
else {
HMI_ERROR("libwm", "Not found key \"response\"");
rc = -EINVAL;
return;
}
- char *buf;
- asprintf(&buf, "%d", id);
- printf("setenv(\"QT_IVI_SURFACE_ID\", %s, 1)\n", buf);
- if (setenv("QT_IVI_SURFACE_ID", buf, 1) != 0) {
- HMI_ERROR("libwm", "putenv failed: %m");
- rc = -errno;
- } else {
- rc = id; // Single point of success
- }
} else {
HMI_ERROR("libwm", "Could not get surface ID from WM: %s",
j != nullptr ? json_object_to_json_string_ext(