aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/applist.cpp b/src/applist.cpp
index 67980f1..473d687 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -82,6 +82,27 @@ void AppList::addClient(const string &appid, unsigned layer, const string &role)
}
/**
+ * Add Client to the list
+ *
+ * This function is overload function.
+ * But this function just register application.
+ * So an application does not have role, surface, layer.
+ * Client need to register role and layer afterward.
+ *
+ * @param string[in] Application id. This will be the key to withdraw the information.
+ * @return None
+ * @attention This function should be called once for the app
+ * Caller should take care not to be called more than once.
+ */
+void AppList::addClient(const string &appid)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ shared_ptr<WMClient> client = std::make_shared<WMClient>(appid, 0, "");
+ this->app2client[appid] = client;
+ this->clientDump();
+}
+
+/**
* Remove WMClient from the list
*
* @param string[in] Application id. This will be the key to withdraw the information.