mmi-client: remove client from focus client or candidates list 41/264041/1
authorSung-Jin Park <sj76.park@samsung.com>
Sat, 24 Jul 2021 19:17:50 +0000 (04:17 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 13 Sep 2021 11:24:38 +0000 (20:24 +0900)
Change-Id: I120b27116f2a9b0ca94fc6c11ea4a4190e35b6bd
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/mmi-client.c

index 7e83c5d..32433eb 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "mmi-client.h"
 #include "mmi-common.h"
+#include "mmi-manager.h"
 #include "mmi-manager-dbg.h"
 #include "interface/mmifw_stub.h"
 
@@ -128,6 +129,11 @@ client_manager_remove_client(const char *sender)
                goto err;
        }
 
+       if (mc->has_focus)
+               mmi_manager_remove_focus_client(mc);
+       else
+               mmi_manager_remove_client_from_focus_candidates(mc);
+
        if (!eina_hash_del(_client_hash, sender, mc))
        {
                LOGE("Failed to remove client info using sender(=%s) !\n", sender);
@@ -489,23 +495,25 @@ client_manager_get_client_feedback_cb_handle(mmi_client *client)
 int
 client_manager_send_focus_event(mmi_client *client, focus_event_arg *args)
 {
-        if (!client || !args)
-                return -1;
-
-        focus_event_arg *ev = (focus_event_arg *)args;
+       if (!client || !args)
+               return -1;
 
+       focus_event_arg *ev = (focus_event_arg *)args;
        //TODO: set args for focus event and invoke focus_event_cb
-        return 0;
+       (void) ev;
+
+       return 0;
 }
 
 int
 client_manager_send_state_change_event(mmi_client *client, state_change_event_arg *args)
 {
-        if (!client || !args)
-                return -1;
-
-        state_change_event_arg *ev = (state_change_event_arg *)args;
+       if (!client || !args)
+               return -1;
 
+       state_change_event_arg *ev = (state_change_event_arg *)args;
        //TODO: set args for state change event and invoke state_change_event_cb
-        return 0;
+       (void) ev;
+
+       return 0;
 }