X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.cpp;h=935063428c739b8b6b1a0336fa71c04d5668727b;hb=8f32cd03059507c6b5bf3d26aaeb851c21d0437e;hp=332a15876528016065d362d1990fe27ad38eceec;hpb=d7f9b04a3e1ad65b70c69242c27469792940bb3b;p=apps%2Fagl-service-windowmanager.git diff --git a/src/main.cpp b/src/main.cpp index 332a158..9350634 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -38,7 +38,7 @@ typedef struct WMClientCtxt WMClientCtxt(const char *appName, const char* appRole) { name = appName; - role = role; + role = appRole; } } WMClientCtxt; @@ -197,6 +197,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); @@ -364,7 +376,8 @@ void windowmanager_activatesurface(afb_req req) noexcept } catch (std::exception &e) { - HMI_WARNING("wm", "failed", "Uncaught exception while calling activatesurface: %s", e.what()); + HMI_WARNING("wm", "failed: Uncaught exception while calling activatesurface: %s", e.what()); + g_afb_instance->app.exeptionProcessForTransition(); return; } } @@ -404,7 +417,8 @@ void windowmanager_deactivatesurface(afb_req req) noexcept } catch (std::exception &e) { - HMI_WARNING("wm", "Uncaught exception while calling deactivatesurface: %s", e.what()); + HMI_WARNING("wm", "failed: Uncaught exception while calling deactivatesurface: %s", e.what()); + g_afb_instance->app.exeptionProcessForTransition(); return; } } @@ -436,7 +450,8 @@ void windowmanager_enddraw(afb_req req) noexcept } catch (std::exception &e) { - HMI_WARNING("wm", "failed", "Uncaught exception while calling enddraw: %s", e.what()); + HMI_WARNING("wm", "failed: Uncaught exception while calling enddraw: %s", e.what()); + g_afb_instance->app.exeptionProcessForTransition(); return; } }