From 464f20cc2a960052233c4e2cbc2bd7dd3876b7f7 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Wed, 13 Mar 2019 18:02:37 +0900 Subject: Fix xdg-runcher doesn't show up xdg-runcher calls "subscribe" before requestSurface, then windowmanager reject it because WMClient object is not created yet. This patch changes to register WMClient if it is not created when App calls "subscribe". Application doesn't need to care about the order of "requestSurface" and "subscribe". Bug-AGL: SPEC-2218 Change-Id: Ia82ff939dfdb2bbfd377bd50fd3d4b844451cd3b Signed-off-by: Kazumasa Mitsunari --- src/applist.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/applist.cpp') diff --git a/src/applist.cpp b/src/applist.cpp index 67980f1..473d687 100644 --- a/src/applist.cpp +++ b/src/applist.cpp @@ -81,6 +81,27 @@ void AppList::addClient(const string &appid, unsigned layer, const string &role) this->clientDump(); } +/** + * 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 lock(this->mtx); + shared_ptr client = std::make_shared(appid, 0, ""); + this->app2client[appid] = client; + this->clientDump(); +} + /** * Remove WMClient from the list * -- cgit 1.2.3-korg