From 0423bdc3e618247700c8a5d02fc9515f4555eab1 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Thu, 9 Sep 2021 19:24:14 +0900 Subject: [PATCH] mmifw & ipc: fix mmi_state_get_current_state() to work correctly Change-Id: I717c5fb58179508c505df40a602ba72d0bec0421 Signed-off-by: Sung-Jin Park --- src/mmifw-ipc.c | 1 + src/mmifw.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mmifw-ipc.c b/src/mmifw-ipc.c index a736a95..8f47fe9 100644 --- a/src/mmifw-ipc.c +++ b/src/mmifw-ipc.c @@ -164,6 +164,7 @@ static void _state_change_event_cb(void *user_data, rpc_port_state_change_event_ goto err; } + _state = ev->state; ecore_event_add(MMI_EVENT_STATE_CHANGE, ev, NULL, user_data); return; err: diff --git a/src/mmifw.c b/src/mmifw.c index 7a4deae..c30c5b7 100644 --- a/src/mmifw.c +++ b/src/mmifw.c @@ -181,16 +181,14 @@ mmi_request_send_get_focus(mmi_handle h) MMIFW_API mmi_state mmi_state_get_current_state(mmi_handle h) { - mmi_state state = MMI_STATE_NONE; - if (!h) { ERR("Given mmi_handle is invalid !\n"); - return state; + return MMI_STATE_NONE; } - state = h->state; - return state; + h->state = mmi_ipc_get_state(); + return h->state; } MMIFW_API mmi_result -- 2.34.1