e_info_server: modify the code following the focus_policy refactoring 55/297555/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 10 Aug 2023 07:40:28 +0000 (16:40 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 21 Aug 2023 07:58:39 +0000 (16:58 +0900)
Need to implement for support this winfo feature

Change-Id: I09e57ce0dd72289fd85626fc898ab54ed577b99f

src/bin/e_info_server.c

index 12aac43..98c6718 100644 (file)
@@ -6926,7 +6926,18 @@ _e_info_server_cb_focus_policy_ext_set(const Eldbus_Service_Interface *iface EIN
    res = e_config->focus_policy_ext;
    if (previous_policy != res)
      {
+#ifdef REFACTOR_FOCUS_POLICY
+        E_Zone *zone = e_zone_current_get();
+        if (zone && zone->focus)
+          {
+             e_focus_del(zone->focus);
+             zone->focus = e_focus_new(zone, res);
+             if (!zone->focus)
+               ERR("Failed to create E_Focus.");
+          }
+#else
         e_client_focus_defer_clear();
+#endif
         changed = EINA_TRUE;
      }
 
@@ -6939,7 +6950,12 @@ _e_info_server_cb_focus_policy_ext_set(const Eldbus_Service_Interface *iface EIN
 static Eldbus_Message *
 _e_info_server_cb_focus_history(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   Eldbus_Message *reply;
+   Eldbus_Message *reply = NULL;
+#ifdef REFACTOR_FOCUS_POLICY
+   // TODO: Get the string value for debugging from e_focus_policy_histoy.c and reply it.
+   // Eldbus_Message_Iter *str = e_focus_policy_history_debug_focus_stack_get();
+   // eldbus_message_iter_arguments_append(array, "(ubbbs)", &str);
+#else
    Eldbus_Message_Iter *iter, *array;
    Eina_List *focus_stack = NULL, *l = NULL;
    E_Client *focused = NULL, *ec = NULL;
@@ -6965,7 +6981,7 @@ _e_info_server_cb_focus_history(const Eldbus_Service_Interface *iface EINA_UNUSE
         eldbus_message_iter_container_close(array, str);
      }
    eldbus_message_iter_container_close(iter, array);
-
+#endif
 
    return reply;
 }