e_comp_wl_capture: support aot window capture 73/314173/1 accepted/tizen/7.0/unified/20240708.174959
authorDoyoun Kang <doyoun.kang@samsung.com>
Sun, 7 Jul 2024 02:27:24 +0000 (11:27 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Sun, 7 Jul 2024 02:27:24 +0000 (11:27 +0900)
Change-Id: I9903e05889cad810c4c293b4e33f9019dda858fd

src/bin/e_comp_wl_capture.c

index 3be106cdfaa8d520a567f0f696b24f89c188fbbc..c82136d416f63bca47432029ddc7dc57ed3998e9 100644 (file)
@@ -1288,6 +1288,29 @@ _e_capture_client_child_is_placed_above(E_Client *child, E_Client *ec)
    return EINA_FALSE;
 }
 
+static Eina_Bool
+_e_capture_client_child_type_check(E_Client *child, E_Client *parent)
+{
+   // check keyboard
+   if (e_policy_client_is_keyboard(child))
+     {
+        if (_e_capture_client_child_is_placed_above(child, parent))
+          {
+             CAPDBG("Capture KBD child (win:%zx, ec:%p).", parent, "ECC", NULL, e_client_util_win_get(child), child);
+             return EINA_TRUE;
+          }
+     }
+
+   // check aot
+   if (e_client_aot_type_get(parent) == E_AOT_TYPE_LAUNCHER)
+     {
+        CAPDBG("Capture AoT child (win:%zx, ec:%p).", parent, "ECC", NULL, e_client_util_win_get(child), child);
+        return EINA_TRUE;
+     }
+
+   return EINA_FALSE;
+}
+
 static Eina_Bool
 _e_capture_client_child_data_check(Thread_Data *td)
 {
@@ -1312,10 +1335,7 @@ _e_capture_client_child_data_check(Thread_Data *td)
         if (child_ec->bg_state)
           continue;
 
-        if (!e_policy_client_is_keyboard(child_ec))
-          continue;
-
-        if (!_e_capture_client_child_is_placed_above(child_ec, ec))
+        if (!_e_capture_client_child_type_check(child_ec, ec))
           continue;
 
         _e_capture_client_child_data_create(td, child_ec);