e_comp_wl: find the focused ec of every zones in e_comp_wl_focused_clients_flush() 17/321717/1
authorduna.oh <duna.oh@samsung.com>
Thu, 27 Mar 2025 07:02:40 +0000 (16:02 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 27 Mar 2025 07:38:54 +0000 (16:38 +0900)
Change-Id: Idfc7335f29182483793ce66530b06ace29790884

src/bin/inputmgr/e_input_backend.c
src/bin/server/e_comp_wl.c
src/bin/server/e_comp_wl_intern.h

index f6a7f44814728a4b7bc8c8cd93e0ddd2ebbf6664..a12033a3c8f7908b016defa2998168165370078e 100644 (file)
@@ -1072,12 +1072,12 @@ input_thread_prepare(GSource *source, gint *time)
 {
    if (e_config->key_input_ttrace_enable)
      {
-        TRACE_INPUT_DEVICE_BEGIN(e_comp_wl_focused_client_flush);
-        ELOGF("INPUT", "e_comp_wl_focused_client_flush|B|", NULL);
+        TRACE_INPUT_DEVICE_BEGIN(e_comp_wl_focused_clients_flush);
+        ELOGF("INPUT", "e_comp_wl_focused_clients_flush|B|", NULL);
      }
 
    /* flush only focused client events */
-   e_comp_wl_focused_client_flush();
+   e_comp_wl_focused_clients_flush();
 
    if (_key_event_list)
      _e_input_delayed_key_events_print();
@@ -1088,7 +1088,7 @@ input_thread_prepare(GSource *source, gint *time)
    if (e_config->key_input_ttrace_enable)
      {
         TRACE_INPUT_DEVICE_END();
-        ELOGF("INPUT", "e_comp_wl_focused_client_flush|E|", NULL);
+        ELOGF("INPUT", "e_comp_wl_focused_clients_flush|E|", NULL);
      }
 
    if (time)
index 26ba92c29d18b74e9b4adfeca97338a9af93b563..9b0d16bb25042922089f2426aa121b7c3f057fdd 100644 (file)
@@ -48,7 +48,7 @@
 #include "e_comp_wl_input_thread_intern.h"
 #include "e_seat_intern.h"
 #include "e_surface_view_intern.h"
-#include "e_zone_intern.h"
+#include "e_focus_intern.h"
 
 #include <tizen-extension-server-protocol.h>
 #include <relative-pointer-unstable-v1-server-protocol.h>
@@ -333,33 +333,31 @@ e_comp_wl_display_flush()
 }
 
 void
-e_comp_wl_focused_client_flush()
+e_comp_wl_focused_clients_flush()
 {
    E_Client *focused_ec;
+   E_Zone *zone;
 
    if (!e_comp_wl_display_get()) return;
 
-   e_input_thread_boost_lock(&connection_mutex);
-   focused_ec = e_client_focused_get();
-
-   if (focused_ec)
+   E_COMP_ZONE_FOREACH(zone)
      {
+        if (!zone->focus) continue;
+
+        focused_ec = e_focus_focused_ec_get(zone->focus);
+        if (!focused_ec) continue;
+
         struct wl_client *wc;
         struct wl_resource *surface = e_comp_wl_client_surface_get(focused_ec);
-        if (!surface)
-          {
-            e_input_thread_boost_unlock(&connection_mutex);
-            return;
-          }
+        if (!surface) continue;
 
+        e_input_thread_boost_lock(&connection_mutex);
         wc = wl_resource_get_client(surface);
         wl_client_flush(wc);
+        e_input_thread_boost_unlock(&connection_mutex);
      }
-
-   e_input_thread_boost_unlock(&connection_mutex);
 }
 
-
 static void
 _e_comp_wl_cb_prepare(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
 {
index a975ecfaa1205261f82b199c7b4d54274ba47e07..d7d94b82ade15b20ca9e47fd8567295b865ad771 100644 (file)
@@ -81,7 +81,7 @@ EINTERN void        e_comp_wl_hook_call(E_Comp_Wl_Hook_Point hookpoint, E_Client
 
 
 EINTERN void    e_comp_wl_display_flush();
-EINTERN void    e_comp_wl_focused_client_flush();
+EINTERN void    e_comp_wl_focused_clients_flush();
 
 EINTERN E_Client *e_comp_wl_util_client_from_surface_resource(struct wl_resource *surface_resource);