summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-25 09:49:55 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-25 19:59:06 +0900
commit2a352777521301937b0d1d4cdcf0e24a1aa2d84e (patch)
tree1d87fd0eaf44b9d4c24c9aee9d422d94a87e8901 /src/main.cpp
parent714b578b8961b218841160e06df976863a2010d8 (diff)
Bug Fix: Window Manager doesn't react after killing app process
After killing an application which has surfaces, Window Manager releases the information for app. Then, invalid access happens. As a result, Application seems to loose their ability to display. This is a potencial bug caused by upgrades of wayland-ivi-extension, so this problem didn't occur in eel branch. This patch fixes the bug. Bug-AGL: SPEC-1421 Change-Id: If921dd4ea6bd46454356e97e1be7e5c136c7383b Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 602e1f6..014c72e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -195,6 +195,18 @@ static void cbRemoveClientCtxt(void *data)
if (pSid)
{
auto sid = *pSid;
+ auto o_state = *g_afb_instance->app.layers.get_layout_state(sid);
+ if (o_state != nullptr)
+ {
+ if (o_state->main == sid)
+ {
+ o_state->main = -1;
+ }
+ else if (o_state->sub == sid)
+ {
+ o_state->sub = -1;
+ }
+ }
g_afb_instance->app.id_alloc.remove_id(sid);
g_afb_instance->app.layers.remove_surface(sid);
g_afb_instance->app.controller->sprops.erase(sid);