summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-10-22 15:57:06 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-10-22 15:57:06 +0900
commit4efe5e5a1de120bbdeef38987861a50829a953a6 (patch)
tree7a48140562905a65bbe37da368694ed756b74faa
parent87d5f3125648ea21f338613a8d27aba7f2db34fb (diff)
Add second argument request_surface_id to setRole
Change-Id: I59b3205325842e3caf1ec8973917d83079602cde Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/libwindowmanager.cpp3
-rw-r--r--src/libwindowmanager.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp
index 0127405..db5afc1 100644
--- a/src/libwindowmanager.cpp
+++ b/src/libwindowmanager.cpp
@@ -940,12 +940,13 @@ int LibWindowmanager::requestSurfaceXDG(const char* role, unsigned ivi_id) {
return this->d->requestSurfaceXDG(object);
}
-int LibWindowmanager::setRole(const char* role)
+int LibWindowmanager::setRole(const char* role, bool request)
{
pid_t pid = getpid(); // need surface rendering process
json_object* object = json_object_new_object();
json_object_object_add(object, "role", json_object_new_string(role));
json_object_object_add(object, "pid", json_object_new_int(pid));
+ json_object_object_add(object, "request_surface_id", json_object_new_boolean(request));
return this->d->setRole(object);
}
diff --git a/src/libwindowmanager.h b/src/libwindowmanager.h
index dcd7416..ebcf0e1 100644
--- a/src/libwindowmanager.h
+++ b/src/libwindowmanager.h
@@ -118,7 +118,7 @@ public:
// WM API
int requestSurface(const char* role);
int requestSurfaceXDG(const char* role, unsigned ivi_id);
- int setRole(const char* role);
+ int setRole(const char* role, bool request_surface_id = false);
int activateWindow(const char* role, const char* area);
int activateWindow(const char* role);
int deactivateWindow(const char* role);