From 2586b2d3138c0f6b6735eb77cf1ebcce47ca1a2d Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Thu, 14 Mar 2019 13:53:46 +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". This patch is backport of master. Bug-AGL: SPEC-2218 Change-Id: I448d84889a24647d4e620c4b8f041087e856da32 Signed-off-by: Kazumasa Mitsunari --- src/wm_client.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/wm_client.cpp') diff --git a/src/wm_client.cpp b/src/wm_client.cpp index da7e626..705bf4d 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -72,6 +72,7 @@ WMClient::WMClient(const string &appid, const string &role) : id(appid), layer(0), is_source_set(false), + main_role(role), role2surface(0), evname2afb_event(0) { @@ -116,11 +117,21 @@ string WMClient::role() const return this->main_role; } +void WMClient::setRole(const string& role) +{ + this->main_role = role; +} + unsigned WMClient::layerID() const { return this->layer; } +void WMClient::setLayerID(unsigned id) +{ + this->layer = id; +} + unsigned WMClient::surfaceID() const { return this->surface; -- cgit 1.2.3-korg