e_desk_area: implement the client_subsurface_stack_update callback function 36/304736/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 14 Dec 2023 08:05:28 +0000 (17:05 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 23 Jan 2024 09:19:21 +0000 (18:19 +0900)
Change-Id: Ide8c4338af6d3980917d795a436ccd1ef8c8ece4

src/bin/e_client.h
src/bin/e_comp_wl_subsurface.c
src/bin/e_desk_area.c

index efdccaf..9f735a0 100644 (file)
@@ -1319,7 +1319,9 @@ EINTERN Eina_Bool e_client_is_parent_iconify_by_client(E_Client *ec);
 
 EINTERN void e_client_stack_transient_for_done_notify(E_Client *ec);
 
+//#ifdef REFACTOR_DESK_AREA
 EINTERN void e_client_subsurface_stack_update(E_Client *ec);
+//#endif
 
 /**
  * Move window to coordinates that do not account client decorations yet.
index 371bba6..3f891d6 100644 (file)
@@ -929,6 +929,9 @@ _e_comp_wl_subsurface_stack_update(E_Client *ec)
    _e_comp_wl_subsurface_restack(topmost);
    _e_comp_wl_subsurface_restack_bg_rectangle(topmost);
 
+#ifdef REFACTOR_DESK_AREA
+   e_client_subsurface_stack_update(ec);
+#else
    //To update client stack list
    if ((ec->comp_data->sub.data) &&
        (ec->comp_data->sub.data->parent))
@@ -953,4 +956,5 @@ _e_comp_wl_subsurface_stack_update(E_Client *ec)
              e_comp_object_layer_update(ec->frame, NULL, o);
           }
      }
+#endif
 }
index 0520202..c3ae33b 100644 (file)
@@ -503,7 +503,36 @@ _desk_area_cb_client_get_below(struct wl_listener *listener, void *data)
 static void
 _desk_area_cb_client_subsurface_stack_update(struct wl_listener *listener, void *data)
 {
-   // TODO:
+   E_Desk_Area_Private_Client *eda_client;
+   E_Client *ec;
+
+   eda_client = wl_container_of(listener, eda_client, client_subsurface_stack_update);
+   ec = eda_client->ec;
+
+   //To update client stack list
+   if ((ec->comp_data->sub.data) &&
+       (ec->comp_data->sub.data->parent))
+     {
+        E_Client *parent;
+        Evas_Object *o;
+
+        parent = ec->comp_data->sub.data->parent;
+
+        if ((parent->comp_data->sub.list) &&
+            (eina_list_data_find(parent->comp_data->sub.list, ec)))
+          {
+             //stack above done
+             o = evas_object_below_get(ec->frame);
+             e_comp_object_layer_update(ec->frame, o, NULL);
+          }
+        else if ((parent->comp_data->sub.below_list) &&
+                 (eina_list_data_find(parent->comp_data->sub.below_list, ec)))
+          {
+             //stack below done
+             o = evas_object_above_get(ec->frame);
+             e_comp_object_layer_update(ec->frame, NULL, o);
+          }
+     }
 }
 static void
 _desk_area_cb_comp_object_lower(struct wl_listener *listener, void *data)