aboutsummaryrefslogtreecommitdiffstats
path: root/src/window_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window_manager.cpp')
-rw-r--r--src/window_manager.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index 24b6f30..2f8e3e9 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -608,6 +608,45 @@ void WindowManager::surface_removed(uint32_t surface_id)
g_app_list.removeSurface(surface_id);
}
+void WindowManager::surface_properties(unsigned surface_id, unsigned pid)
+{
+ HMI_DEBUG("wm", "get surface properties");
+
+ // search pid from surfaceID
+ /*json_object *response;
+ afb_service_call_sync("afm-main", "runners", nullptr, &response);
+
+ // retrieve appid from pid from application manager
+ std::string appid = "";
+ if(response == nullptr)
+ {
+ HMI_ERROR("wm", "No runners");
+ }
+ else
+ {
+ // check appid then add it to the client
+ HMI_INFO("wm", "Runners:%s", json_object_get_string(response));
+ int size = json_object_array_length(response);
+ for(int i = 0; i < size; i++)
+ {
+ json_object *j = json_object_array_get_idx(response, i);
+ const char* id = jh::getStringFromJson(j, "id");
+ int runid = jh::getIntFromJson(j, "runid");
+ if(id && (runid > 0))
+ {
+ if(runid == pid)
+ {
+ appid = id;
+ break;
+ }
+ }
+ }
+ }
+ json_object_put(response);
+
+ g_app_list.addFloatingSurface(appid, surface_id, pid);*/
+}
+
void WindowManager::removeClient(const std::string &appid)
{
HMI_DEBUG("wm", "Remove clinet %s from list", appid.c_str());
@@ -1553,4 +1592,9 @@ void controller_hooks::surface_destination_rectangle(uint32_t /*surface_id*/,
uint32_t /*w*/,
uint32_t /*h*/) {}
+void controller_hooks::surface_properties(uint32_t surface_id, uint32_t pid)
+{
+ this->wmgr->surface_properties(surface_id, pid);
+}
+
} // namespace wm