e_comp_object: remove "hiding" smart call
[platform/upstream/enlightenment.git] / src / bin / e_comp_object.c
index 50d1b4c..07fdcb4 100644 (file)
@@ -1,4 +1,21 @@
-#include "e.h"
+#include "e_comp_object_intern.h"
+#include "e_bindings_intern.h"
+#include "e_utils_intern.h"
+#include "e_comp_canvas_intern.h"
+#include "e_comp_cfdata_intern.h"
+#include "e_comp_wl_subsurface_intern.h"
+#include "e_comp_wl_tbm_intern.h"
+#include "e_comp_intern.h"
+#include "e_pixmap_intern.h"
+#include "e_map_intern.h"
+#include "e_hwc_window_intern.h"
+#include "e_hwc_windows_intern.h"
+#include "e_policy_visibility_intern.h"
+#include "e_client_video_intern.h"
+#include "e_client_intern.h"
+#include "e_zone_intern.h"
+#include "e_theme_intern.h"
+#include "e_config_intern.h"
 
 /* data keys:
 
 #define RENDER_DEBUG(...)
 #endif
 
-typedef struct _E_Comp_Object
-{
-   EINA_INLIST;
-
-   int                  x, y, w, h;  // geometry
-
-   E_Client *ec;
-
-   E_Comp_Object_Frame client_inset;
-   struct
-   {
-      double          start;
-      double          val;
-      int             x, y;
-      E_Direction     dir;
-      Ecore_Animator *anim;
-   } shade;
-
-   Eina_Stringshare   *frame_theme;
-   Eina_Stringshare   *frame_name;
-   Eina_Stringshare   *visibility_effect; //effect when toggling visibility
-
-   E_Comp_Object_Content_Type content_type; // type of e.swallow.content
-
-   Evas_Object         *smart_obj;  // smart object
-   Evas_Object         *clip; // clipper over effect object
-   Evas_Object         *input_obj; // input smart object
-   Evas_Object         *obj;  // composite object
-   Evas_Object         *frame_object; // for client frames
-   Evas_Object         *shobj;  // shadow object
-   Evas_Object         *effect_obj; // effects object
-   Evas_Object         *transform_bg_obj;   // transform backgroung with keep_ratio option
-   struct
-     {
-        int r, g, b, a;
-     } transform_bg_color;
-   Evas_Object         *transform_tranp_obj;// transform transp rect obj
-   Evas_Object         *default_input_obj; // default input object
-   unsigned int         layer; //e_comp_canvas_layer_map(cw->ec->layer)
-   Eina_List           *obj_mirror;  // extra mirror objects
-   Eina_Tiler          *updates; //render update regions
-   Eina_Tiler          *pending_updates; //render update regions which are about to render
-
-   Evas_Native_Surface *ns; //for custom gl rendering
-
-   struct wl_listener   buffer_destroy_listener;
-
-   unsigned int         update_count;  // how many updates have happened to this obj
-
-   unsigned int         opacity;  // opacity set with _NET_WM_WINDOW_OPACITY
-
-   unsigned int         animating;  // it's busy animating
-   unsigned int         failures; //number of consecutive e_pixmap_image_draw() failures
-   unsigned int         force_visible; //number of visible obj_mirror objects
-   Eina_Bool            delete_pending : 1;  // delete pending
-   Eina_Bool            defer_hide : 1;  // flag to get hide to work on deferred hide
-   Eina_Bool            showing : 1;  // object is currently in "show" animation
-   Eina_Bool            hiding : 1;   // object is currently in "hide" animation
-   Eina_Bool            visible : 1;  // is visible
-
-   Eina_Bool            shaped : 1;  // is shaped
-   Eina_Bool            update : 1;  // has updates to fetch
-   Eina_Bool            redirected : 1;  // has updates to fetch
-   Eina_Bool            native : 1;  // native
-
-   Eina_Bool            nocomp : 1;  // nocomp applied
-   Eina_Bool            hwc_need_update : 1;  // this window updated while on e_plane to do hw composite
-   Eina_Bool            real_hid : 1;  // last hide was a real window unmap
-
-   Eina_Bool            effect_set : 1; //effect_obj has a valid group
-   Eina_Bool            effect_running : 1; //effect_obj is playing an animation
-   Eina_Bool            effect_clip : 1; //effect_obj is clipped
-   Eina_Bool            effect_clip_able : 1; //effect_obj will be clipped for effects
-
-   Eina_Bool            updates_exist : 1;
-   Eina_Bool            updates_full : 1; // entire object will be updated
-
-   Eina_Bool            force_move : 1;
-   Eina_Bool            frame_extends : 1; //frame may extend beyond object size
-   Eina_Bool            blanked : 1; //window is rendering blank content (externally composited)
-   Eina_Bool            external_content : 1; // e.swallow.content(obj) is set by external evas object
-   Eina_Bool            user_alpha_set : 1;
-   Eina_Bool            user_alpha : 1;
-
-   struct
-     {
-        Evas_Object         *obj; // mask object: transparent parts of this comp object allow to copy the alpha to current H/W plane.
-        Evas_Render_Op       saved_render_op; // saved render operation value to restore when clear a mask.
-     } mask;
-
-   struct
-     {
-        Evas_Object         *obj;
-        int                  w, h;
-     } indicator; //indicator object for internal client
-
-   struct
-     {
-        Evas_Object         *mask_obj;
-        Eina_Bool           enable;
-        Eina_Bool           mask_set;
-        int                 mask_x, mask_y, mask_w, mask_h;
-     } dim;
-
-   Eina_Bool            render_trace : 1; // trace co->obj rendering on canvas
-
-   tbm_surface_h        tbm_surface;
-   E_Comp_Image_Filter  image_filter;
-   Eina_Bool            set_mouse_callbacks;
-
-   struct
-     {
-        int lock;
-        E_Comp_Wl_Buffer_Ref buffer_ref;
-        Eina_Bool            pending_move_set;
-        int                  pending_move_x, pending_move_y;
-        Eina_Bool            pending_resize_set;
-        int                  pending_resize_w, pending_resize_h;
-     } render_update_lock;
-
-   struct
-     {
-        Eina_Bool        set;
-        int              user_r;
-        int              user_g;
-        int              user_b;
-        int              user_a;
-     } transparent;
-} E_Comp_Object;
-
 typedef struct _E_Input_Rect_Data
 {
    Eina_Rectangle rect;
@@ -224,6 +111,7 @@ static Eina_Inlist *_e_comp_object_hooks[] =
    [E_COMP_OBJECT_HOOK_MASK_OBJECT_SET] = NULL,
    [E_COMP_OBJECT_HOOK_MASK_OBJECT_UNSET] = NULL,
    [E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET] = NULL,
+   [E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_UNSET] = NULL,
 };
 
 #ifdef _F_E_COMP_OBJECT_INTERCEPT_HOOK_
@@ -256,7 +144,15 @@ static void           _e_comp_object_dim_enable_set(E_Client *ec, Evas_Object *o
 static Eina_Bool      _e_comp_object_dim_enable_get(E_Client *ec, Evas_Object *obj);
 static void           _e_comp_object_dim_update(E_Comp_Object *cw);
 static void           _e_comp_object_native_surface_set(E_Comp_Object *cw, Evas_Native_Surface *ns, Eina_Bool with_mirror);
-static void           _e_comp_object_layer_set(Evas_Object *obj, short layer);
+#ifdef REFACTOR_DESK_AREA
+#else
+static void _e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj);
+static void _e_comp_object_raise(Evas_Object *obj);
+static void  _e_comp_object_layer_set(Evas_Object *obj, short layer);
+static void _e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target);
+static void _e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target);
+static void _e_comp_object_transform_obj_stack_update(Evas_Object *obj);
+#endif
 
 static E_Client       *dim_client = NULL;
 
@@ -291,7 +187,9 @@ _e_comp_object_hook_call(E_Comp_Object_Hook_Point hookpoint, E_Client *ec)
             (hookpoint != E_COMP_OBJECT_HOOK_RESTACK) &&
             (hookpoint != E_COMP_OBJECT_HOOK_MASK_OBJECT_SET) &&
             (hookpoint != E_COMP_OBJECT_HOOK_MASK_OBJECT_UNSET) &&
-            (hookpoint != E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET))
+            (hookpoint != E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET) &&
+            (hookpoint != E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_UNSET)
+            )
           {
              return ret;
           }
@@ -468,8 +366,13 @@ _e_comp_object_cb_mirror_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
 
 /////////////////////////////////////
 
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_transform_obj_stack_update(Evas_Object *obj)
+#else
 static void
 _e_comp_object_transform_obj_stack_update(Evas_Object *obj)
+#endif
 {
    int layer = 0;
    API_ENTRY;
@@ -584,60 +487,82 @@ _e_comp_shaped_check(int w, int h, const Eina_Rectangle *rects, int num)
 /////////////////////////////////////
 
 /* add a client to the layer-client list */
+#ifdef REFACTOR_DESK_AREA
+#else
+static void
+_e_comp_input_thread_layers_update(void *data)
+{
+   E_Comp_Input_Layer_Data *layer_data = data;
+   EINA_SAFETY_ON_NULL_RETURN(layer_data);
+
+   INF("[input thread|%s] layer(%u), function type(%d), item(%p), relative(%p)\n",
+       __func__, layer_data->layer, layer_data->type, layer_data->item, layer_data->relative);
+   e_comp_input_layers_update(layer_data);
+}
+
+static void
+_e_comp_object_layers_update(unsigned int layer, E_Comp_Input_Inlist_Function_Type type, E_Client *item, E_Client *relative)
+{
+   E_Comp_Input_Layer_Data layer_data;
+   memset(&layer_data, 0, sizeof(E_Comp_Input_Layer_Data));
+
+   layer_data.layer = layer;
+   layer_data.type = type;
+   layer_data.item = item;
+   layer_data.relative = relative;
+
+   INF("[%s] layer(%u), function type(%d), item(%p), relative(%p)\n", __func__, layer, type, item, relative);
+   e_input_thread_safe_call(_e_comp_input_thread_layers_update, &layer_data, sizeof(E_Comp_Input_Layer_Data));
+}
+
 static void
 _e_comp_object_layers_add(E_Comp_Object *cw, E_Comp_Object *above, E_Comp_Object *below, Eina_Bool prepend)
 {
-   E_Comp_Object *layer_cw = NULL;
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
-   /* try to get the internal data for the layer;
-    * will return NULL for fake layers (eg. wayland)
-    */
-   if (e_comp->layers[cw->layer].obj)
+   if (above)
      {
-        if (evas_object_smart_smart_get(e_comp->layers[cw->layer].obj))
-          layer_cw = evas_object_smart_data_get(e_comp->layers[cw->layer].obj);
+        e_comp->layers[above->layer].clients = eina_inlist_append_relative(e_comp->layers[above->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(above->ec));
+        _e_comp_object_layers_update(above->layer, E_COMP_INPUT_INLIST_APPEND_RELATIVE, e_comp->layers[above->layer].clients, cw->ec, above->ec);
      }
-   if (layer_cw == cw) layer_cw = NULL;
-   if (above)
-    e_comp->layers[above->layer].clients = eina_inlist_append_relative(e_comp->layers[above->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(above->ec));
    else if (below)
-     e_comp->layers[below->layer].clients = eina_inlist_prepend_relative(e_comp->layers[below->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(below->ec));
+     {
+        e_comp->layers[below->layer].clients = eina_inlist_prepend_relative(e_comp->layers[below->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(below->ec));
+        _e_comp_object_layers_update(above->layer, E_COMP_INPUT_INLIST_APPEND_RELATIVE, cw->ec, above->ec);
+     }
    if ((!above) && (!below))
      {
         if (prepend)
-          e_comp->layers[cw->layer].clients = eina_inlist_prepend(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
-        else if (layer_cw)
-          e_comp->layers[cw->layer].clients = eina_inlist_prepend_relative(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(layer_cw->ec));
+          {
+             e_comp->layers[cw->layer].clients = eina_inlist_prepend(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+             _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_PREPEND, cw->ec, NULL);
+          }
         else //this is either the layer object or a tough actin tinactin^W^W^Wfast stacking client
-          e_comp->layers[cw->layer].clients = eina_inlist_append(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
-     }
-   e_comp->layers[cw->layer].clients_count++;
-#ifndef E_RELEASE_BUILD
-   if (layer_cw)
-     {
-        E_Client *below_ec = e_client_below_get(cw->ec);
-        if (below_ec)
           {
-             if (e_comp->layers[cw->layer].obj == below_ec->frame)
-               CRI("ACK! ec:%p", cw->ec);
+             e_comp->layers[cw->layer].clients = eina_inlist_append(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+             _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_APPEND, cw->ec, NULL);
           }
      }
-#endif
+   e_comp->layers[cw->layer].clients_count++;
+
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static void
 _e_comp_object_layers_remove(E_Comp_Object *cw)
 {
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
+
    if (cw->ec && e_comp->layers[cw->layer].clients)
      {
         e_comp->layers[cw->layer].clients = eina_inlist_remove(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+        _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_REMOVE, cw->ec, NULL);
         e_comp->layers[cw->layer].clients_count--;
      }
-/*
-   e_comp->layers[cw->layer].objs = eina_inlist_remove(e_comp->layers[cw->layer].objs, EINA_INLIST_GET(cw));
-   e_comp->layers[cw->layer].objs_count--;
-*/
+
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
+#endif
 
 /////////////////////////////////////
 static void
@@ -801,7 +726,7 @@ _e_comp_object_map_damage_transform_get(E_Client *ec)
    int bw, bh;
    int i;
 
-   if (!evas_object_map_enable_get(ec->frame))
+   if (!e_client_transform_core_enable_get(ec))
      return NULL;
 
    m = e_client_map_get(ec);
@@ -1003,12 +928,7 @@ _e_comp_object_shadow_client_match(const E_Client *ec, E_Comp_Match *m)
     }
   if (m->modal != 0)
     {
-       int modal = 0;
-
-       if (ec->netwm.state.modal)
-         modal = 1;
-       if (!(((m->modal == -1) && (!modal)) ||
-             ((m->modal == 1) && (modal))))
+       if (!(m->modal == -1))
          return EINA_FALSE;
     }
   return EINA_TRUE;
@@ -1025,7 +945,7 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
    E_Input_Rect_Smart_Data *input_rect_sd;
    E_Comp_Match *m;
    Eina_Stringshare *reshadow_group = NULL;
-   Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE, fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE, pass_event_flag = EINA_FALSE;
+   Eina_Bool focus = EINA_FALSE, skip = EINA_FALSE, fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE, pass_event_flag = EINA_FALSE;
    Eina_Stringshare *name, *title;
    E_Comp_Config *conf = e_comp_config_get();
 
@@ -1048,7 +968,6 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
              if (!_e_comp_object_shadow_client_match(cw->ec, m)) continue;
 
              focus = m->focus;
-             urgent = m->urgent;
              no_shadow = m->no_shadow;
              if (m->shadow_style)
                {
@@ -1145,16 +1064,6 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
      e_comp_object_signal_emit(cw->smart_obj, "e,state,focused", "e");
    else
      e_comp_object_signal_emit(cw->smart_obj, "e,state,unfocused", "e");
-   if (urgent || cw->ec->urgent)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,urgent", "e");
-   else
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,not_urgent", "e");
-   if (cw->ec->shaded)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,shaded", "e");
-   if (cw->ec->sticky)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
-   if (cw->ec->hung)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,hung", "e");
    /* visibility must always be enabled for re_manage clients to prevent
     * pop-in animations every time the user sees a persistent client again;
     * applying visibility for iconic clients prevents the client from getting
@@ -1256,7 +1165,7 @@ _e_comp_object_animating_end(E_Comp_Object *cw)
              cw->showing = cw->hiding = 0;
              UNREFD(cw->ec, 2);
              if (e_comp->animating == 0)
-               e_client_visibility_calculate();
+               e_comp_visibility_calculation_set(EINA_TRUE);
              /* remove ref from animation start, account for possibility of deletion from unref */
              return !!e_object_unref(E_OBJECT(cw->ec));
           }
@@ -1276,14 +1185,21 @@ _e_comp_object_done_defer(void *data, Evas_Object *obj EINA_UNUSED, const char *
    if (!_e_comp_object_animating_end(cw)) return;
    if (cw->animating) return;
    /* hide only after animation finishes to guarantee a full run of the animation */
-   if (cw->defer_hide && ((!strcmp(emission, "e,action,hide,done")) || (!strcmp(emission, "e,action,done"))))
-     evas_object_hide(cw->smart_obj);
+   if (!cw->defer_hide) return;
+   if ((!strcmp(emission, "e,action,hide,done")) ||
+       (!strcmp(emission, "e,action,done")) ||
+       ((cw->ec->iconic) && (!strcmp(emission, "e,action,show,done"))))
+     {
+        ELOGF("COMP", "defer hide emission:%s", cw->ec, emission);
+        evas_object_hide(cw->smart_obj);
+     }
 }
 
 /* run a visibility compositor effect if available, return false if object is dead */
 static Eina_Bool
 _e_comp_object_effect_visibility_start(E_Comp_Object *cw, Eina_Bool state)
 {
+   E_Zone *zone;
    int x, y;
    int zw = 0, zh = 0;
 
@@ -1298,8 +1214,9 @@ _e_comp_object_effect_visibility_start(E_Comp_Object *cw, Eina_Bool state)
    evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
    x -= cw->x;
    y -= cw->y;
-   if (cw->ec->zone)
-     zw = cw->ec->zone->w, zh = cw->ec->zone->h;
+   zone = e_comp_zone_find_by_ec(cw->ec);
+   if (zone)
+     zw = zone->w, zh = zone->h;
    else
      {
         E_Zone *zone;
@@ -1353,6 +1270,96 @@ _e_comp_object_mouse_event_callback_unset(E_Comp_Object *cw)
    cw->set_mouse_callbacks = EINA_FALSE;
 }
 
+static Eina_Bool
+_e_comp_object_color_visible_set(E_Comp_Object *cw, Eina_Bool set)
+{
+   if (cw->color_visible == set) return EINA_TRUE;
+
+   cw->color_visible = set;
+
+   ELOGF("COMP", "color_visible set:%d", cw->ec, set);
+
+   wl_signal_emit(&cw->events.color_visible_set, NULL);
+
+   return EINA_TRUE;
+}
+
+static void
+_e_comp_object_color_visible_update(E_Comp_Object *cw)
+{
+   int a;
+
+   e_comp_object_color_get(cw->smart_obj, NULL, NULL, NULL, &a);
+   if (a <= 0)
+     {
+        _e_comp_object_color_visible_set(cw, EINA_FALSE);
+        return;
+     }
+
+   if (cw->effect_obj)
+     {
+        evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
+        if (a <= 0)
+          {
+             _e_comp_object_color_visible_set(cw, EINA_FALSE);
+             return;
+          }
+     }
+
+
+   if (cw->shobj)
+     {
+        evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
+        if (a <= 0)
+          {
+             _e_comp_object_color_visible_set(cw, EINA_FALSE);
+             return;
+          }
+     }
+
+   if (cw->obj)
+     {
+        evas_object_color_get(cw->obj, NULL, NULL, NULL, &a);
+        if (a <= 0)
+          {
+             _e_comp_object_color_visible_set(cw, EINA_FALSE);
+             return;
+          }
+     }
+
+   _e_comp_object_color_visible_set(cw, EINA_TRUE);
+}
+
+static void
+_e_comp_intercept_effect_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
+{
+   E_Comp_Object *cw = data;
+
+   evas_object_color_set(obj, r, g, b, a);
+
+   _e_comp_object_color_visible_update(cw);
+}
+
+static void
+_e_comp_intercept_shobj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
+{
+   E_Comp_Object *cw = data;
+
+   evas_object_color_set(obj, r, g, b, a);
+
+   _e_comp_object_color_visible_update(cw);
+}
+
+static void
+_e_comp_intercept_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
+{
+   E_Comp_Object *cw = data;
+
+   evas_object_color_set(obj, r, g, b, a);
+
+   _e_comp_object_color_visible_update(cw);
+}
+
 static void
 _e_comp_object_setup(E_Comp_Object *cw)
 {
@@ -1364,11 +1371,13 @@ _e_comp_object_setup(E_Comp_Object *cw)
    evas_object_move(cw->effect_obj, cw->x, cw->y);
    evas_object_clip_set(cw->effect_obj, cw->clip);
    evas_object_smart_member_add(cw->effect_obj, cw->smart_obj);
+   evas_object_intercept_color_set_callback_add(cw->effect_obj, _e_comp_intercept_effect_obj_color_set, cw);
    e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none");
    cw->shobj = edje_object_add(e_comp->evas);
    evas_object_data_set(cw->shobj, "comp_smart_obj", cw->smart_obj);
    edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj);
    edje_object_signal_callback_add(cw->shobj, "e,action,*,done", "e", _e_comp_object_done_defer, cw);
+   evas_object_intercept_color_set_callback_add(cw->shobj, _e_comp_intercept_shobj_color_set, cw);
 
    /* name objects appropriately for nicer printing when using e_comp_util_wins_print() */
    if (cw->ec->override)
@@ -1453,12 +1462,11 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
    else if (e_comp_object_render(ec->frame))
      {
         /* apply shape mask if necessary */
-        if ((!cw->native) && (ec->shaped || ec->shape_changed))
+        if ((!cw->native) && (ec->shaped))
           e_comp_object_shape_apply(ec->frame);
-        ec->shape_changed = 0;
      }
    /* shaped clients get precise mouse events to handle transparent pixels */
-   evas_object_precise_is_inside_set(cw->obj, ec->shaped || ec->shaped_input);
+   evas_object_precise_is_inside_set(cw->obj, ec->shaped);
 
    /* queue another render if client is still dirty; cannot refresh here. */
    if (e_pixmap_dirty_get(ec->pixmap) && e_pixmap_size_get(ec->pixmap, &pw, &ph))
@@ -1491,22 +1499,6 @@ _e_comp_object_pixels_noti(void *data, Evas_Object *obj EINA_UNUSED)
 /////////////////////////////////////////////
 
 static void
-_e_comp_object_client_pending_resize_add(E_Client *ec,
-                                         int w,
-                                         int h,
-                                         unsigned int serial)
-{
-   E_Client_Pending_Resize *pnd;
-
-   pnd = E_NEW(E_Client_Pending_Resize, 1);
-   if (!pnd) return;
-   pnd->w = w;
-   pnd->h = h;
-   pnd->serial = serial;
-   ec->pending_resize = eina_list_append(ec->pending_resize, pnd);
-}
-
-static void
 _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
 {
    E_Comp_Object *cw = data;
@@ -1534,7 +1526,8 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
      {
         if ((x != cw->ec->x) || (y != cw->ec->y))
           {
-             ELOGF("COMP", "Set Pos to (%d,%d). current ec_pos(%d,%d)", cw->ec, x, y, cw->ec->x, cw->ec->y);
+             if (!cw->ec->is_cursor)
+               ELOGF("COMP", "Set Pos to (%d,%d). current ec_pos(%d,%d)", cw->ec, x, y, cw->ec->x, cw->ec->y);
              e_client_pos_set(cw->ec, x, y);
              cw->ec->changes.pos = 1;
              EC_CHANGED(cw->ec);
@@ -1586,16 +1579,17 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
         /* prevent moving at all if move isn't allowed in current maximize state */
         if ((!e_config->allow_manip) && ((cw->ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return;
         /* queue unmaximize if we are allowing move and update unmaximize geometry */
-        if ((!cw->ec->shading) && (!cw->ec->shaded))
-          {
-             cw->ec->changes.need_unmaximize = 1;
-             cw->ec->saved.x = ix - cw->ec->zone->x;
-             cw->ec->saved.y = iy - cw->ec->zone->y;
-             cw->ec->saved.w = cw->ec->client.w;
-             cw->ec->saved.h = cw->ec->client.h;
-             EC_CHANGED(cw->ec);
-             return;
-          }
+
+        E_Zone *zone;
+        zone = e_comp_zone_find_by_ec(cw->ec);
+        if (!zone) return;
+
+        cw->ec->changes.need_unmaximize = 1;
+        cw->ec->saved.x = ix - zone->x;
+        cw->ec->saved.y = iy - zone->y;
+        cw->ec->saved.w = cw->ec->client.w;
+        cw->ec->saved.h = cw->ec->client.h;
+        EC_CHANGED(cw->ec);
         return;
      }
    /* only update during resize if triggered by resize */
@@ -1619,11 +1613,9 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
      {
         /* only update xy position of client to avoid invalid
          * first damage region if it is not a new_client. */
-        if (!cw->ec->shading)
-          {
-             cw->ec->client.x = ix;
-             cw->ec->client.y = iy;
-          }
+        cw->ec->client.x = ix;
+        cw->ec->client.y = iy;
+
         /* flip SSD->CSD */
         if (!cw->frame_object)
           x = ix, y = iy;
@@ -1636,6 +1628,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
 {
    E_Comp_Object *cw = data;
    int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h, x, y;
+   E_Zone *zone;
 
    if (cw->render_update_lock.lock)
      {
@@ -1660,7 +1653,6 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
    fh = (!cw->frame_object) * (-cw->client_inset.t - cw->client_inset.b);
    if ((cw->w == w + fw) && (cw->h == h + fh))
      {
-        if (cw->ec->shading || cw->ec->shaded) return;
         if (((cw->ec->w != w) || (cw->ec->h != h)) ||
             (cw->ec->client.w != w - cw->client_inset.l - cw->client_inset.r) ||
             (cw->ec->client.h != h - cw->client_inset.t - cw->client_inset.b))
@@ -1669,13 +1661,18 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
              e_client_size_set(cw->ec, w, h);
              cw->ec->client.w = w - cw->client_inset.l - cw->client_inset.r;
              cw->ec->client.h = h - cw->client_inset.t - cw->client_inset.b;
-             evas_object_smart_callback_call(obj, "client_resize", NULL);
+             wl_signal_emit(&cw->events.resize, NULL);
           }
         return;
      }
    /* guarantee that fullscreen is fullscreen */
-   if (cw->ec->fullscreen && ((w != cw->ec->zone->w) || (h != cw->ec->zone->h)))
-     return;
+   zone = e_comp_zone_find_by_ec(cw->ec);
+   if (!zone) return;
+   if (cw->ec->fullscreen && ((w != zone->w) || (h != zone->h)))
+     {
+        if (!e_client_transform_core_enable_get(cw->ec))
+          return;
+     }
    /* calculate client size */
    iw = w - cw->client_inset.l - cw->client_inset.r;
    ih = h - cw->client_inset.t - cw->client_inset.b;
@@ -1683,33 +1680,31 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
      {
         /* prevent resizing while maximized depending on direction and config */
         if ((!e_config->allow_manip) && ((cw->ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return;
-        if ((!cw->ec->shading) && (!cw->ec->shaded))
+
+        Eina_Bool reject = EINA_FALSE;
+        if (cw->ec->maximized & E_MAXIMIZE_VERTICAL)
           {
-             Eina_Bool reject = EINA_FALSE;
-             if (cw->ec->maximized & E_MAXIMIZE_VERTICAL)
-               {
-                  if (cw->ec->client.h != ih)
-                    {
-                       cw->ec->saved.h = ih;
-                       cw->ec->saved.y = cw->ec->client.y - cw->ec->zone->y;
-                       reject = cw->ec->changes.need_unmaximize = 1;
-                    }
-               }
-             if (cw->ec->maximized & E_MAXIMIZE_HORIZONTAL)
+             if (cw->ec->client.h != ih)
                {
-                  if (cw->ec->client.w != iw)
-                    {
-                       cw->ec->saved.w = iw;
-                       cw->ec->saved.x = cw->ec->client.x - cw->ec->zone->x;
-                       reject = cw->ec->changes.need_unmaximize = 1;
-                    }
+                  cw->ec->saved.h = ih;
+                  cw->ec->saved.y = cw->ec->client.y - zone->y;
+                  reject = cw->ec->changes.need_unmaximize = 1;
                }
-             if (reject)
+          }
+        if (cw->ec->maximized & E_MAXIMIZE_HORIZONTAL)
+          {
+             if (cw->ec->client.w != iw)
                {
-                  EC_CHANGED(cw->ec);
-                  return;
+                  cw->ec->saved.w = iw;
+                  cw->ec->saved.x = cw->ec->client.x - zone->x;
+                  reject = cw->ec->changes.need_unmaximize = 1;
                }
           }
+        if (reject)
+          {
+             EC_CHANGED(cw->ec);
+             return;
+          }
      }
    if (cw->ec->new_client || (!cw->ec->visible) || (!cw->effect_obj))
      {
@@ -1722,13 +1717,6 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
           }
         return;
      }
-   if ((!cw->ec->internal) && e_client_util_resizing_get(cw->ec) && cw->ec->netwm.sync.request &&
-       ((cw->ec->w != w) || (cw->ec->h != h)))
-     {
-        /* this is ugly. */
-        /* netwm sync resizes queue themselves and then trigger later on */
-        _e_comp_object_client_pending_resize_add(cw->ec, iw, ih, cw->ec->netwm.sync.serial);
-     }
    if (e_client_pending_geometry_has(cw->ec))
      {
         /* do nothing while waiting paired commit serial*/
@@ -1736,13 +1724,10 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
      }
 
    e_client_size_set(cw->ec, w, h);
-   if ((!cw->ec->shading) && (!cw->ec->shaded))
-     {
-        /* client geom never changes when shading since the client is never altered */
-        cw->ec->client.w = iw;
-        cw->ec->client.h = ih;
-        if ((cw->ec->client.w < 0) || (cw->ec->client.h < 0)) CRI("WTF. ec:%p", cw->ec);
-     }
+
+   cw->ec->client.w = iw;
+   cw->ec->client.h = ih;
+   if ((cw->ec->client.w < 0) || (cw->ec->client.h < 0)) CRI("WTF. ec:%p", cw->ec);
 
    /* The size of non-compositing window can be changed, so there is a
     * need to check that cw is H/W composited if cw is not redirected.
@@ -1766,11 +1751,11 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
    prev_w = cw->w, prev_h = cw->h;
    e_comp_object_frame_wh_adjust(obj, 0, 0, &fw, &fh);
    /* check shading and clamp to pixmap size for regular clients */
-   if ((!cw->ec->shading) && (!cw->ec->shaded) && (!cw->ec->input_only) && (!cw->ec->override) &&
+   if ((!cw->ec->input_only) && (!cw->ec->override) &&
        (((w - fw != pw) || (h - fh != ph))))
      {
         //INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph);
-        evas_object_smart_callback_call(obj, "client_resize", NULL);
+        wl_signal_emit(&cw->events.resize, NULL);
         /* flip for CSD */
         if (cw->frame_object || cw->ec->input_only)
           e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h);
@@ -1786,20 +1771,18 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
      }
    else
      {
-        evas_object_smart_callback_call(obj, "client_resize", NULL);
-
         /* flip for CSD */
         if ((!cw->frame_object) && (!cw->ec->input_only))
           w = pw, h = ph;
+
+        wl_signal_emit(&cw->events.resize, NULL);
         /* "just do it" for overrides */
         evas_object_resize(obj, w, h);
      }
    if (!cw->ec->override)
      {
         /* shape probably changed for non-overrides */
-        cw->ec->need_shape_merge |= cw->ec->shaped || cw->ec->shaped_input;
-        cw->ec->need_shape_export |= cw->ec->shaped;
-        if (cw->ec->shaped || cw->ec->shaped_input)
+        if (cw->ec->shaped)
           EC_CHANGED(cw->ec);
      }
 
@@ -1833,6 +1816,22 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
 static void
 _e_comp_intercept_layer_set(void *data, Evas_Object *obj, int layer)
 {
+#ifdef REFACTOR_DESK_AREA
+   E_Comp_Object *cw = data;
+   E_Comp_Object_Data_Set_Layer layer_set_data;
+
+   layer_set_data.cw = cw;
+   layer_set_data.layer = layer;
+
+   wl_signal_emit(&cw->events.set_layer, &layer_set_data);
+
+   if (cw->visible)
+     {
+        e_comp_render_queue();
+        e_comp_object_transform_obj_stack_update(obj);
+     }
+
+#else
    E_Comp_Object *cw = data;
    E_Comp_Wl_Client_Data *child_cdata;
    unsigned int l = e_comp_canvas_layer_map(layer);
@@ -1898,6 +1897,7 @@ layer_set:
    /* clamp to valid client layer */
    layer = e_comp_canvas_client_layer_map_nearest(layer);
    cw->ec->layer = layer;
+   e_client_input_thread_layer_set(cw->ec, layer);
    if (e_config->transient.layer)
      {
         E_Client *child;
@@ -1939,12 +1939,21 @@ layer_set:
    if (!cw->visible) return;
    e_comp_render_queue();
    _e_comp_object_transform_obj_stack_update(obj);
+#endif
 }
 
+#ifdef REFACTOR_DESK_AREA
+#else
 typedef void (*E_Comp_Object_Stack_Func)(Evas_Object *obj, Evas_Object *stack);
+#endif
 
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_raise(Evas_Object *obj)
+#else
 static void
 _e_comp_object_raise(Evas_Object *obj)
+#endif
 {
    evas_object_raise(obj);
 
@@ -1956,8 +1965,13 @@ _e_comp_object_raise(Evas_Object *obj)
      }
 }
 
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj)
+#else
 static void
-_e_comp_object_lower(Evas_Object *obj)
+_e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj)
+#endif
 {
    evas_object_lower(obj);
 
@@ -1965,12 +1979,24 @@ _e_comp_object_lower(Evas_Object *obj)
      {
         E_Client *ec = e_comp_object_client_get(obj);
         if (ec)
-          _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RESTACK, ec);
+          {
+             _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RESTACK, ec);
+#ifdef REFACTOR_DESK_AREA
+             wl_signal_emit(&cw->events.lower_done, NULL);
+#else
+             wl_signal_emit(&cw->events.lower, NULL);
+#endif
+          }
      }
 }
 
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target)
+#else
 static void
 _e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target)
+#endif
 {
    evas_object_stack_above(obj, target);
 
@@ -1982,8 +2008,13 @@ _e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target)
      }
 }
 
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target)
+#else
 static void
 _e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target)
+#endif
 {
    evas_object_stack_below(obj, target);
 
@@ -1995,8 +2026,13 @@ _e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target)
      }
 }
 
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_layer_set(Evas_Object *obj, short layer)
+#else
 static void
 _e_comp_object_layer_set(Evas_Object *obj, short layer)
+#endif
 {
    evas_object_layer_set(obj, layer);
 
@@ -2008,6 +2044,8 @@ _e_comp_object_layer_set(Evas_Object *obj, short layer)
      }
 }
 
+#ifdef REFACTOR_DESK_AREA
+#else
 static Eina_Bool
 _e_comp_object_is_pending(E_Client *ec)
 {
@@ -2027,7 +2065,11 @@ _e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Obj
    E_Client *ecstack;
    short layer;
    Evas_Object *o = stack;
+#ifdef REFACTOR_DESK_AREA
+   Eina_Bool raising = stack_cb == e_comp_object_stack_above;
+#else
    Eina_Bool raising = stack_cb == _e_comp_object_stack_above;
+#endif
 
    /* We should consider topmost's layer_pending for subsurface */
    if ((cw->ec->layer_block) || _e_comp_object_is_pending(cw->ec))
@@ -2058,8 +2100,6 @@ _e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Obj
    ecstack = e_client_below_get(cw->ec);
    if (layer != e_comp_canvas_layer_map_to(cw->layer))
      {
-        /* some FOOL is trying to restack a layer marker */
-        if (cw->smart_obj == e_comp->layers[cw->layer].obj) return;
         evas_object_layer_set(cw->smart_obj, layer);
         /* we got our layer wrangled, return now! */
         if (layer != e_comp_canvas_layer_map_to(cw->layer)) return;
@@ -2173,22 +2213,36 @@ _e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Obj
    if (!cw->visible) return;
    e_comp_render_queue();
 }
+#endif
 
 static void
 _e_comp_intercept_stack_above(void *data, Evas_Object *obj, Evas_Object *above)
 {
    EINA_SAFETY_ON_TRUE_RETURN(obj == above);
 
+   TRACE_DS_BEGIN(COMP:INTERCEPT STACK ABOVE);
+
+#ifdef REFACTOR_DESK_AREA
+   E_Comp_Object *cw = data;
+   E_Comp_Object_Data_Stack_Above stack_above_data;
+
+   stack_above_data.cw = cw;
+   stack_above_data.above_obj = above;
+
+   wl_signal_emit(&cw->events.stack_above, &stack_above_data);
+#else
    if (evas_object_below_get(obj) == above)
      {
         e_comp_object_layer_update(obj, above, NULL);
         return;
      }
 
-   TRACE_DS_BEGIN(COMP:INTERCEPT STACK ABOVE);
    _e_comp_intercept_stack_helper(data, above, _e_comp_object_stack_above);
+
    _e_comp_object_transform_obj_stack_update(obj);
    _e_comp_object_transform_obj_stack_update(above);
+#endif
+
    TRACE_DS_END();
 }
 
@@ -2196,18 +2250,35 @@ static void
 _e_comp_intercept_stack_below(void *data, Evas_Object *obj, Evas_Object *below)
 {
    EINA_SAFETY_ON_TRUE_RETURN(obj == below);
+
+   TRACE_DS_BEGIN(COMP:INTERCEPT STACK BELOW);
+
+#ifdef REFACTOR_DESK_AREA
+   E_Comp_Object *cw = data;
+   E_Comp_Object_Data_Stack_Below stack_below_data;
+
+   stack_below_data.cw = cw;
+   stack_below_data.below_obj = below;
+
+   wl_signal_emit(&cw->events.stack_below, &stack_below_data);
+
+   if (!cw->visible)
+     e_comp_render_queue();
+#else
    if (evas_object_above_get(obj) == below)
      {
         e_comp_object_layer_update(obj, NULL, below);
         return;
      }
 
-   TRACE_DS_BEGIN(COMP:INTERCEPT STACK BELOW);
    _e_comp_intercept_stack_helper(data, below, _e_comp_object_stack_below);
+
    if (evas_object_smart_smart_get(obj))
      _e_comp_object_transform_obj_stack_update(obj);
    if (evas_object_smart_smart_get(below))
      _e_comp_object_transform_obj_stack_update(below);
+#endif
+
    TRACE_DS_END();
 }
 
@@ -2215,16 +2286,27 @@ static void
 _e_comp_intercept_lower(void *data, Evas_Object *obj)
 {
    E_Comp_Object *cw = data;
+
+#ifdef REFACTOR_DESK_AREA
+#else
    Evas_Object *o;
+#endif
 
    TRACE_DS_BEGIN(COMP:INTERCEPT LOWER);
 
+#ifdef REFACTOR_DESK_AREA
+   wl_signal_emit(&cw->events.lower, cw);
+#else
    if ((cw->ec->layer_block) || (cw->ec->layer_pending))
      {
         if (cw->ec->layer_pending)
           e_comp_object_layer_update(obj, NULL, obj);
 
-        _e_comp_object_lower(obj);
+#ifdef REFACTOR_DESK_AREA
+        e_comp_object_lower(cw, obj);
+#else
+        _e_comp_object_lower(cw, obj);
+#endif
         goto end;
      }
    if (!EINA_INLIST_GET(cw->ec)->prev) goto end; //already lowest on layer
@@ -2233,17 +2315,23 @@ _e_comp_intercept_lower(void *data, Evas_Object *obj)
    /* prepend to client list since this client should be the first item now */
    _e_comp_object_layers_add(cw, NULL, NULL, 1);
    if (evas_object_layer_get(o) != evas_object_layer_get(obj)) goto end; //already at bottom!
-   if (obj == e_comp->layers[cw->layer].obj) goto end; //never lower a layer marker!
    evas_object_data_set(obj, "client_restack", (void*)1);
-   _e_comp_object_lower(obj);
+#ifdef REFACTOR_DESK_AREA
+   e_comp_object_lower(cw, obj);
+#else
+   _e_comp_object_lower(cw, obj);
+#endif
    evas_object_data_del(obj, "client_restack");
    if (!cw->visible) goto end;
    e_comp_render_queue();
+#ifdef REFACTOR_DESK_AREA
+   e_comp_object_transform_obj_stack_update(obj);
+#else
    _e_comp_object_transform_obj_stack_update(obj);
+#endif
 
 end:
-   if (!cw->ec->post_lower)
-     e_client_focus_stack_lower(cw->ec);
+#endif
    TRACE_DS_END();
 }
 
@@ -2251,10 +2339,17 @@ static void
 _e_comp_intercept_raise(void *data, Evas_Object *obj)
 {
    E_Comp_Object *cw = data;
+#ifdef REFACTOR_DESK_AREA
+#else
    Evas_Object *o;
+   Evas_Object *op;
+#endif
 
    TRACE_DS_BEGIN(COMP:INTERCEPT RAISE);
 
+#ifdef REFACTOR_DESK_AREA
+   wl_signal_emit(&cw->events.raise, cw);
+#else
    if ((cw->ec->layer_block) || (cw->ec->layer_pending))
      {
         if (cw->ec->layer_pending)
@@ -2263,45 +2358,47 @@ _e_comp_intercept_raise(void *data, Evas_Object *obj)
              if (cw->ec->layer != obj_layer)
                e_comp_object_layer_update(obj, NULL, NULL);
           }
-
+#ifdef REFACTOR_DESK_AREA
+        e_comp_object_raise(obj);
+#else
         _e_comp_object_raise(obj);
+#endif
         goto end;
      }
    if (!EINA_INLIST_GET(cw->ec)->next) goto end;//already highest on layer
    o = evas_object_above_get(obj);
-   {
-      E_Client *ecabove = e_client_above_get(cw->ec);
-      if (ecabove && (ecabove->frame == e_comp->layers[cw->layer].obj) &&
-          (ecabove->frame == o)) goto end; //highest below marker
-   }
    if (evas_object_layer_get(o) != evas_object_layer_get(obj)) goto end; //already at top!
-   if (obj == e_comp->layers[cw->layer].obj) //never raise a non-layer marker!
-     _e_comp_object_raise(obj);
-   else
-     {
-        Evas_Object *op;
 
-        /* still stack below override below the layer marker */
-        for (op = o = e_comp->layers[cw->layer].obj;
-             o && o != e_comp->layers[cw->layer - 1].obj;
-             op = o, o = evas_object_below_get(o))
+   /* still stack below override below the layer marker */
+   for (op = o = e_comp->layers[cw->layer].obj;
+        o && o != e_comp->layers[cw->layer - 1].obj;
+        op = o, o = evas_object_below_get(o))
+     {
+        if (evas_object_smart_smart_get(o))
           {
-             if (evas_object_smart_smart_get(o))
-               {
-                  E_Client *ec;
+             E_Client *ec;
 
-                  ec = e_comp_object_client_get(o);
-                  if (ec && (!ec->override)) break;
-               }
+             ec = e_comp_object_client_get(o);
+             if (ec && (!ec->override)) break;
           }
-        _e_comp_object_stack_below(obj, op);
-        e_client_focus_defer_set(cw->ec);
      }
+#ifdef REFACTOR_DESK_AREA
+   e_comp_object_stack_below(obj, op);
+#else
+   _e_comp_object_stack_below(obj, op);
+#endif
+   e_client_focus_defer_set(cw->ec);
+
    if (!cw->visible) goto end;
    e_comp_render_queue();
+#ifdef REFACTOR_DESK_AREA
+   e_comp_object_transform_obj_stack_update(obj);
+#else
    _e_comp_object_transform_obj_stack_update(obj);
+#endif
 
 end:
+#endif
    TRACE_DS_END();
 }
 
@@ -2322,6 +2419,7 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
      {
         ELOGF("COMP", "Hide. Cancel launching flag", cw->ec);
         cw->ec->launching = EINA_FALSE;
+        e_comp_object_signal_emit(cw->ec->frame, "e,action,launch,cancel", "e");
      }
 
    if (cw->ec->hidden)
@@ -2329,6 +2427,9 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
         /* hidden flag = just do it */
         ELOGF("COMP", "Hide hidden evas_object:%p", cw->ec, obj);
         evas_object_hide(obj);
+
+        wl_signal_emit(&cw->events.hide, NULL);
+
         return;
      }
 
@@ -2337,6 +2438,9 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
         /* input_only = who cares */
         ELOGF("COMP", "Hide input_only evas_object:%p", cw->ec, obj);
         evas_object_hide(obj);
+
+        wl_signal_emit(&cw->events.hide, NULL);
+
         return;
      }
    /* already hidden or currently animating */
@@ -2367,7 +2471,9 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
                     _e_comp_object_animating_begin(cw);
                   if (!_e_comp_object_effect_visibility_start(cw, 0)) return;
                }
-             evas_object_smart_callback_call(obj, "hiding", cw->ec);
+
+             wl_signal_emit(&cw->events.hiding, NULL);
+
              cw->defer_hide = !!cw->animating;
              if (!cw->animating)
                e_comp_object_effect_set(obj, NULL);
@@ -2378,6 +2484,8 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
    cw->defer_hide = 0;
    ELOGF("COMP", "Hide normal object:%p", cw->ec, obj);
    evas_object_hide(obj);
+
+   wl_signal_emit(&cw->events.hide, NULL);
 }
 
 static void
@@ -2407,8 +2515,6 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
          cw->visible, cw->animating, cw->defer_hide, cw->content_type, cw->updates, cw->w, cw->h,
          ec->iconic, ec->exp_iconify.by_client, ec->exp_iconify.type, ec->input_only, ec->ignored, ec->new_client);
 
-   if (ec->sticky)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
    if (cw->visible)
      {
         if (ec->iconic && cw->animating)
@@ -2543,18 +2649,10 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
                   e_comp_object_dirty(cw->smart_obj);
                   e_comp_object_render(cw->smart_obj);
                }
-
-             if (!ec->iconic ||
-                 e_policy_visibility_client_is_uniconic(ec))
-               {
-                  if (ec->exp_iconify.not_raise &&
-                      e_client_check_above_focused(ec))
-                    e_client_focus_stack_append_current_focused(ec);
-                  else
-                    e_client_focus_defer_set(ec);
-               }
           }
      }
+
+   wl_signal_emit(&cw->events.show, NULL);
 }
 
 static void
@@ -2603,6 +2701,7 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
              evas_object_image_smooth_scale_set(cw->obj, e_comp_config_get()->smooth_windows);
              evas_object_name_set(cw->obj, "cw->obj");
              evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
+             evas_object_intercept_color_set_callback_add(cw->obj, _e_comp_intercept_obj_color_set, cw);
           }
         _e_comp_object_alpha_set(cw);
 
@@ -2681,8 +2780,7 @@ _e_comp_intercept_focus(void *data, Evas_Object *obj, Eina_Bool focus)
                   /* don't focus an iconified window. that's silly! */
                   ELOGF("FOCUS", "Do uniconify to set focus", ec);
                   e_client_uniconify(ec);
-                  if (e_client_focus_track_enabled())
-                    e_client_focus_latest_set(ec);
+                  e_client_focus_latest_set(ec);
                   return;
                }
           }
@@ -2690,16 +2788,24 @@ _e_comp_intercept_focus(void *data, Evas_Object *obj, Eina_Bool focus)
           {
              return;
           }
-        if ((!ec->sticky) && (ec->desk) && (!ec->desk->visible))
-          {
-             if (ec->desk->animate_count) return;
-             e_desk_show(ec->desk);
-             if (!ec->desk->visible) return;
-          }
      }
 
    if (focus)
      {
+        /* check for modal child and set focus to modal child */
+        E_Client *modal_child = e_client_modal_child_get(ec);
+        if ((modal_child) && (modal_child != ec) &&
+            (!e_client_is_iconified_by_client(modal_child)) &&
+            (modal_child->visible) && (!e_object_is_del(E_OBJECT(modal_child))))
+          {
+             // add ec to latest focus stack
+             e_client_focus_latest_set(ec);
+
+             ELOGF("FOCUS", "FOCUS SET to MODAL (ec:%p, win:0x%08zx, frame:%p)", ec, modal_child, e_client_util_win_get(modal_child), modal_child->frame);
+             //e_client_focused_set(modal_child);
+             evas_object_focus_set(modal_child->frame, focus);
+             return;
+          }
         if (!cw->visible)
           {
              /* not yet visible, wait till the next time... */
@@ -2747,7 +2853,12 @@ _e_comp_intercept_color_set(void *data, Evas_Object *obj, int r, int g, int b, i
      {
         evas_object_color_set(obj, r, g, b, a);
      }
+
+   wl_signal_emit(&cw->events.color_set, NULL);
+
+   _e_comp_object_color_visible_update(cw);
 }
+
 ////////////////////////////////////////////////////
 
 static void
@@ -2807,6 +2918,7 @@ static void
 _e_comp_smart_cb_frame_recalc(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
    E_Comp_Object *cw = data;
+   E_Zone *zone;
    int w, h, pw, ph;
 
    /* - get current size
@@ -2823,9 +2935,12 @@ _e_comp_smart_cb_frame_recalc(void *data, Evas_Object *obj, void *event_info EIN
      e_comp_object_frame_wh_adjust(obj, cw->ec->client.w, cw->ec->client.h, &w, &h);
 
    evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset);
-   if (cw->ec->shading || cw->ec->shaded) return;
    if (cw->ec->fullscreen)
-     evas_object_resize(cw->ec->frame, cw->ec->zone->w, cw->ec->zone->h);
+     {
+        zone = e_comp_zone_find_by_ec(cw->ec);
+        if (!zone) return;
+        evas_object_resize(cw->ec->frame, zone->w, zone->h);
+     }
    else if (cw->ec->new_client)
      {
         if ((cw->ec->w < 1) || (cw->ec->h < 1)) return;
@@ -2837,52 +2952,6 @@ _e_comp_smart_cb_frame_recalc(void *data, Evas_Object *obj, void *event_info EIN
 }
 
 static void
-_e_comp_smart_cb_shading(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
-
-   cw->shade.x = cw->x;
-   cw->shade.y = cw->y;
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,shading", "e");
-}
-
-static void
-_e_comp_smart_cb_shaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
-
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,shaded", "e");
-}
-
-static void
-_e_comp_smart_cb_unshading(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
-
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,unshading", "e");
-}
-
-static void
-_e_comp_smart_cb_unshaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
-
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,unshaded", "e");
-}
-
-static void
 _e_comp_smart_cb_maximize(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
    E_Comp_Object *cw = data;
@@ -2947,36 +3016,6 @@ _e_comp_smart_cb_unfullscreen(void *data, Evas_Object *obj, void *event_info EIN
 }
 
 static void
-_e_comp_smart_cb_sticky(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
-   e_comp_object_signal_emit(obj, "e,state,sticky", "e");
-}
-
-static void
-_e_comp_smart_cb_unsticky(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
-   e_comp_object_signal_emit(obj, "e,state,unsticky", "e");
-}
-
-static void
-_e_comp_smart_cb_unhung(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,unhung", "e");
-}
-
-static void
-_e_comp_smart_cb_hung(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,hung", "e");
-}
-
-static void
 _e_comp_smart_focus_in(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
    e_comp_object_signal_emit(obj, "e,state,focused", "e");
@@ -3148,6 +3187,26 @@ _e_comp_smart_add(Evas_Object *obj)
    cw = E_NEW(E_Comp_Object, 1);
    EINA_SAFETY_ON_NULL_RETURN(cw);
 
+   wl_signal_init(&cw->events.lower);
+#ifdef REFACTOR_DESK_AREA
+   wl_signal_init(&cw->events.lower_done);
+   wl_signal_init(&cw->events.raise);
+#endif
+   wl_signal_init(&cw->events.show);
+   wl_signal_init(&cw->events.hide);
+   wl_signal_init(&cw->events.hiding);
+#ifdef REFACTOR_DESK_AREA
+   wl_signal_init(&cw->events.set_layer);
+   wl_signal_init(&cw->events.stack_above);
+   wl_signal_init(&cw->events.stack_below);
+#endif
+   wl_signal_init(&cw->events.image_filter_set);
+   wl_signal_init(&cw->events.render_op_set);
+   wl_signal_init(&cw->events.content_type_set);
+   wl_signal_init(&cw->events.color_set);
+   wl_signal_init(&cw->events.color_visible_set);
+   wl_signal_init(&cw->events.resize);
+
    cw->smart_obj = obj;
    cw->x = cw->y = cw->w = cw->h = -1;
    evas_object_smart_data_set(obj, cw);
@@ -3158,6 +3217,7 @@ _e_comp_smart_add(Evas_Object *obj)
    cw->transform_bg_color.g = 0;
    cw->transform_bg_color.b = 0;
    cw->transform_bg_color.a = 255;
+   cw->color_visible = EINA_TRUE;
    evas_object_data_set(obj, "comp_obj", cw);
    evas_object_move(obj, -1, -1);
    /* intercept ALL the callbacks! */
@@ -3173,22 +3233,11 @@ _e_comp_smart_add(Evas_Object *obj)
    evas_object_intercept_focus_set_callback_add(obj, _e_comp_intercept_focus, cw);
    evas_object_intercept_color_set_callback_add(obj, _e_comp_intercept_color_set, cw);
 
-   evas_object_smart_callback_add(obj, "shading", _e_comp_smart_cb_shading, cw);
-   evas_object_smart_callback_add(obj, "shaded", _e_comp_smart_cb_shaded, cw);
-   evas_object_smart_callback_add(obj, "unshading", _e_comp_smart_cb_unshading, cw);
-   evas_object_smart_callback_add(obj, "unshaded", _e_comp_smart_cb_unshaded, cw);
-
    evas_object_smart_callback_add(obj, "maximize", _e_comp_smart_cb_maximize, cw);
    evas_object_smart_callback_add(obj, "fullscreen", _e_comp_smart_cb_fullscreen, cw);
    evas_object_smart_callback_add(obj, "unmaximize", _e_comp_smart_cb_unmaximize, cw);
    evas_object_smart_callback_add(obj, "unfullscreen", _e_comp_smart_cb_unfullscreen, cw);
 
-   evas_object_smart_callback_add(obj, "stick", _e_comp_smart_cb_sticky, cw);
-   evas_object_smart_callback_add(obj, "unstick", _e_comp_smart_cb_unsticky, cw);
-
-   evas_object_smart_callback_add(obj, "hung", _e_comp_smart_cb_hung, cw);
-   evas_object_smart_callback_add(obj, "unhung", _e_comp_smart_cb_unhung, cw);
-
    evas_object_smart_callback_add(obj, "frame_recalc", _e_comp_smart_cb_frame_recalc, cw);
 
    evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN, _e_comp_smart_focus_in, cw);
@@ -3200,7 +3249,6 @@ _e_comp_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
    INTERNAL_ENTRY;
    evas_object_color_set(cw->clip, r, g, b, a);
-   evas_object_smart_callback_call(obj, "color_set", NULL);
 }
 
 
@@ -3255,14 +3303,7 @@ _e_comp_smart_hide(Evas_Object *obj)
         if (cw->frame_object)
           edje_object_play_set(cw->frame_object, 0);
      }
-   /* ensure focus-out */
-   if (cw->ec->focused &&
-       (e_config->focus_policy_ext != E_FOCUS_EXT_TOP_STACK))
-     {
-        ELOGF("FOCUS", "focus unset | smart_hide", cw->ec);
-        e_client_frame_focus_set(cw->ec, EINA_FALSE);
-        e_client_focus_defer_unset(cw->ec);
-     }
+
    e_comp_render_queue(); //force nocomp recheck
 
    TRACE_DS_END();
@@ -3387,16 +3428,19 @@ _e_comp_smart_del(Evas_Object *obj)
              evas_object_del(o);
           }
      }
+#ifdef REFACTOR_DESK_AREA
+#else
    _e_comp_object_layers_remove(cw);
+#endif
    l = evas_object_data_get(obj, "comp_object-to_del");
    E_FREE_LIST(l, evas_object_del);
    _e_comp_object_mouse_event_callback_unset(cw);
    evas_object_del(cw->clip);
-   evas_object_del(cw->effect_obj);
+   evas_object_del(cw->obj);
    evas_object_del(cw->shobj);
+   evas_object_del(cw->effect_obj);
    evas_object_del(cw->frame_object);
    evas_object_del(cw->input_obj);
-   evas_object_del(cw->obj);
    evas_object_del(cw->mask.obj);
    if (cw->dim.mask_obj) evas_object_del(cw->dim.mask_obj);
    evas_object_del(cw->transform_bg_obj);
@@ -3447,44 +3491,38 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
 
    first = ((cw->w < 1) || (cw->h < 1));
    cw->w = w, cw->h = h;
-   if ((!cw->ec->shading) && (!cw->ec->shaded))
-     {
-        int ww, hh, pw, ph;
 
-        if (cw->frame_object)
-          e_comp_object_frame_wh_unadjust(obj, w, h, &ww, &hh);
-        else
-          ww = w, hh = h;
-        /* verify pixmap:object size */
-        if (e_pixmap_size_get(cw->ec->pixmap, &pw, &ph) && (!cw->ec->override))
-          {
-             if ((ww != pw) || (hh != ph))
-               ELOGF("COMP", "CW RSZ: %dx%d || PX: %dx%d.", cw->ec, ww, hh, pw, ph);
-          }
-        evas_object_resize(cw->effect_obj, tw, th);
-        evas_object_resize(cw->default_input_obj, w, h);
-        if (cw->input_obj)
-          evas_object_resize(cw->input_obj, w, h);
-        if (cw->mask.obj)
-          evas_object_resize(cw->mask.obj, w, h);
-        /* resize render update tiler */
-        if (!first)
-          {
-             RENDER_DEBUG("DAMAGE UNFULL: %p", cw->ec);
-             cw->updates_full = 0;
-             if (cw->updates) eina_tiler_clear(cw->updates);
-          }
-        else
-          {
-             RENDER_DEBUG("DAMAGE RESIZE(%p): %dx%d", cw->ec, cw->ec->client.w, cw->ec->client.h);
-             if (cw->updates) eina_tiler_area_size_set(cw->updates, cw->ec->client.w, cw->ec->client.h);
-          }
+   int ww, hh, pw, ph;
+
+   if (cw->frame_object)
+     e_comp_object_frame_wh_unadjust(obj, w, h, &ww, &hh);
+   else
+     ww = w, hh = h;
+   /* verify pixmap:object size */
+   if (e_pixmap_size_get(cw->ec->pixmap, &pw, &ph) && (!cw->ec->override))
+     {
+        if ((ww != pw) || (hh != ph))
+          ELOGF("COMP", "CW RSZ: %dx%d || PX: %dx%d.", cw->ec, ww, hh, pw, ph);
+     }
+   evas_object_resize(cw->effect_obj, tw, th);
+   evas_object_resize(cw->default_input_obj, w, h);
+   if (cw->input_obj)
+     evas_object_resize(cw->input_obj, w, h);
+   if (cw->mask.obj)
+     evas_object_resize(cw->mask.obj, w, h);
+   /* resize render update tiler */
+   if (!first)
+     {
+        RENDER_DEBUG("DAMAGE UNFULL: %p", cw->ec);
+        cw->updates_full = 0;
+        if (cw->updates) eina_tiler_clear(cw->updates);
      }
    else
      {
-        evas_object_resize(cw->effect_obj, tw, th);
-        evas_object_resize(cw->default_input_obj, w, h);
+        RENDER_DEBUG("DAMAGE RESIZE(%p): %dx%d", cw->ec, cw->ec->client.w, cw->ec->client.h);
+        if (cw->updates) eina_tiler_area_size_set(cw->updates, cw->ec->client.w, cw->ec->client.h);
      }
+
    if (!cw->visible)
      {
         TRACE_DS_END();
@@ -3717,7 +3755,7 @@ e_comp_object_intercept_hook_del(E_Comp_Object_Intercept_Hook *ch)
 E_API Evas_Object *
 e_comp_object_util_add(Evas_Object *obj)
 {
-   Evas_Object *o, *z = NULL;
+   Evas_Object *o;
    const char *name;
    E_Comp_Config *conf = e_comp_config_get();
    Eina_Bool skip = EINA_FALSE;
@@ -3753,18 +3791,18 @@ e_comp_object_util_add(Evas_Object *obj)
    evas_object_geometry_set(o, x, y, w, h);
    evas_object_pass_events_set(o, evas_object_pass_events_get(obj));
 
-   edje_object_signal_callback_add(o, "e,action,*,done", "e", _e_comp_object_util_done_defer, z);
+   edje_object_signal_callback_add(o, "e,action,*,done", "e", _e_comp_object_util_done_defer, NULL);
 
-   evas_object_intercept_show_callback_add(o, _e_comp_object_util_show, z);
-   evas_object_intercept_hide_callback_add(o, _e_comp_object_util_hide, z);
-   evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE, _e_comp_object_util_moveresize, z);
-   evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _e_comp_object_util_del, z);
-   evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _e_comp_object_util_moveresize, z);
-   evas_object_event_callback_add(o, EVAS_CALLBACK_RESTACK, _e_comp_object_util_restack, z);
+   evas_object_intercept_show_callback_add(o, _e_comp_object_util_show, NULL);
+   evas_object_intercept_hide_callback_add(o, _e_comp_object_util_hide, NULL);
+   evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE, _e_comp_object_util_moveresize, NULL);
+   evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _e_comp_object_util_del, NULL);
+   evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _e_comp_object_util_moveresize, NULL);
+   evas_object_event_callback_add(o, EVAS_CALLBACK_RESTACK, _e_comp_object_util_restack, NULL);
 
    e_comp_object_signal_emit(o, "e,state,hidden", "e");
 
-   edje_object_part_swallow(o, "e.swallow.content", z ?: obj);
+   edje_object_part_swallow(o, "e.swallow.content", obj);
 
    _e_comp_object_event_add(o);
 
@@ -3916,7 +3954,7 @@ e_comp_object_util_zone_get(Evas_Object *obj)
 
    SOFT_ENTRY(NULL);
    if (cw)
-     zone = cw->ec->zone;
+     zone = e_comp_zone_find_by_ec(cw->ec);
    if (!zone)
      {
         int x, y;
@@ -4069,8 +4107,8 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
         evas_object_clip_set(input_rect_data->obj, cw->clip);
         evas_object_smart_member_add(input_rect_data->obj, cw->input_obj);
         evas_object_geometry_set(input_rect_data->obj,
-          MAX(cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l), 0) + x,
-          MAX(cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t), 0) + y, w, h);
+          cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l) + x,
+          cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t) + y, w, h);
         evas_object_pass_events_set(cw->default_input_obj, 1);
         evas_object_pass_events_set(cw->obj, 1);
         if (cw->visible)
@@ -4165,18 +4203,7 @@ EINTERN Eina_Bool
 e_comp_object_frame_allowed(Evas_Object *obj)
 {
    API_ENTRY EINA_FALSE;
-   return (!cw->ec->mwm.borderless) && (cw->frame_object || (!cw->client_inset.calc));
-}
-
-EINTERN Eina_Bool
-e_comp_object_frame_title_set(Evas_Object *obj, const char *name)
-{
-   API_ENTRY EINA_FALSE;
-   if (!e_util_strcmp(cw->frame_name, name)) return EINA_FALSE;
-   eina_stringshare_replace(&cw->frame_name, name);
-   if (cw->frame_object)
-     edje_object_part_text_set(cw->frame_object, "e.text.title", cw->frame_name);
-   return EINA_TRUE;
+   return (cw->frame_object || (!cw->client_inset.calc));
 }
 
 EINTERN Eina_Bool
@@ -4296,9 +4323,13 @@ reshadow:
                }
              else
                {
+                  E_Zone *zone;
+                  zone = e_comp_zone_find_by_ec(cw->ec);
+                  if (!zone) break;
+
                   x = cw->ec->client.x, y = cw->ec->client.y;
-                  x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l);
-                  y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t);
+                  x = MAX(zone->x, cw->ec->client.x - cw->client_inset.l);
+                  y = MAX(zone->y, cw->ec->client.y - cw->client_inset.t);
                }
              new_x = x, new_y = y;
           }
@@ -4463,8 +4494,6 @@ e_comp_object_render_update_add(Evas_Object *obj)
 
    if (cw->ec->input_only || (!cw->updates) || (!cw->redirected)) return;
    if (cw->render_update_lock.lock) return;
-   if (e_object_is_del(E_OBJECT(cw->ec)))
-     CRI("CAN'T RENDER A DELETED CLIENT!!! ec:%p", cw->ec);
    if (!e_pixmap_usable_get(cw->ec->pixmap)) return;
    if (!cw->update)
      {
@@ -4631,13 +4660,16 @@ _e_comp_object_transparent_set(Evas_Object *obj, Eina_Bool set)
     if (set)
       {
          evas_object_color_get(obj, &r, &g, &b, &a);
-         evas_object_color_set(obj, 0, 0, 0, 0);
 
          cw->transparent.user_r = r;
          cw->transparent.user_g = g;
          cw->transparent.user_b = b;
          cw->transparent.user_a = a;
 
+         cw->transparent.setting = EINA_TRUE;
+         evas_object_color_set(obj, 0, 0, 0, 0);
+         cw->transparent.setting = EINA_FALSE;
+
          ELOGF("COMP", "Transparent enabled user_color(%d,%d,%d,%d)",
                cw->ec,
                cw->transparent.user_r,
@@ -5226,7 +5258,7 @@ _e_comp_object_effect_end_cb(void *data, Evas_Object *obj, const char *emission,
      {
         evas_object_data_del(cw->smart_obj, "effect_running");
         _e_comp_object_event_simple(obj, E_EVENT_COMP_OBJECT_EFFECT_END);
-        e_client_visibility_calculate();
+        e_comp_visibility_calculation_set(EINA_TRUE);
      }
 
    end_cb = evas_object_data_get(obj, "_e_comp.end_cb");
@@ -5241,10 +5273,12 @@ EINTERN void
 e_comp_object_effect_clip(Evas_Object *obj)
 {
    API_ENTRY;
-   if (!cw->ec->zone) return;
+   E_Zone *zone;
+   zone = e_comp_zone_find_by_ec(cw->ec);
+   if (!zone) return;
    if (cw->effect_clip) e_comp_object_effect_unclip(cw->smart_obj);
    if (!cw->effect_clip_able) return;
-   evas_object_clip_set(cw->smart_obj, cw->ec->zone->bg_clip_object);
+   evas_object_clip_set(cw->smart_obj, zone->bg_clip_object);
    cw->effect_clip = 1;
 }
 
@@ -5313,7 +5347,7 @@ e_comp_object_effect_stop(Evas_Object *obj, Edje_Signal_Cb end_cb)
    if (evas_object_data_get(cw->smart_obj, "effect_running"))
      {
         evas_object_data_del(cw->smart_obj, "effect_running");
-        e_client_visibility_calculate();
+        e_comp_visibility_calculation_set(EINA_TRUE);
      }
 
    cw->effect_running = 0;
@@ -5441,8 +5475,11 @@ _e_comp_object_autoclose_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_O
    evas_object_event_callback_del(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show);
    _e_comp_object_autoclose_cleanup(1);
    if (e_client_focused_get()) return;
-   if (e_config->focus_policy != E_FOCUS_MOUSE)
-     e_client_refocus();
+
+   E_Zone *zone = e_zone_current_get();
+   if (!zone) return;
+
+   e_zone_focus_reset(zone);
 }
 
 EINTERN void
@@ -5627,7 +5664,11 @@ e_comp_object_transform_bg_set(Evas_Object *obj, Eina_Bool set)
              cw->transform_bg_obj = o;
              evas_object_name_set(cw->transform_bg_obj, "cw->transform_bg_obj");
           }
+#ifdef REFACTOR_DESK_AREA
+        e_comp_object_transform_obj_stack_update(obj);
+#else
         _e_comp_object_transform_obj_stack_update(obj);
+#endif
      }
    else
      {
@@ -5703,14 +5744,21 @@ e_comp_object_transform_transp_set(Evas_Object *obj, Eina_Bool set)
              if (cw->visible) evas_object_show(o);
 
              cw->transform_tranp_obj = o;
+             evas_object_pass_events_set(cw->transform_tranp_obj, EINA_TRUE);
+             ELOGF("TRANSFORM","transform set: TRUE", cw->ec);
              evas_object_name_set(cw->transform_tranp_obj, "cw->transform_trasp_obj");
           }
+#ifdef REFACTOR_DESK_AREA
+        e_comp_object_transform_obj_stack_update(obj);
+#else
         _e_comp_object_transform_obj_stack_update(obj);
+#endif
      }
    else
      {
         if (cw->transform_tranp_obj)
           {
+             ELOGF("TRANSFORM","transform set: FALSE", cw->ec);
              evas_object_smart_member_del(cw->transform_tranp_obj);
              E_FREE_FUNC(cw->transform_tranp_obj, evas_object_del);
           }
@@ -5739,6 +5787,8 @@ e_comp_object_transform_transp_vertices_set_with_zoom(Evas_Object *obj, E_Util_T
    _e_comp_object_transform_obj_map_set_with_zoom(cw->transform_tranp_obj, vertices, zoom);
 }
 
+#ifdef REFACTOR_DESK_AREA
+#else
 EINTERN void
 e_comp_object_layer_update(Evas_Object *obj,
                            Evas_Object *above, Evas_Object *below)
@@ -5803,6 +5853,7 @@ e_comp_object_layer_update(Evas_Object *obj,
    else
      _e_comp_object_layers_add(cw, NULL, NULL, 0);
 }
+#endif
 
 EINTERN int
 e_comp_object_layer_get(Evas_Object *obj)
@@ -5850,6 +5901,8 @@ e_comp_object_content_set(Evas_Object *obj,
    if (cw->shobj)
      _e_comp_object_shadow_setup(cw);
 
+   wl_signal_emit(&cw->events.content_type_set, NULL);
+
    return EINA_TRUE;
 }
 
@@ -5907,6 +5960,7 @@ e_comp_object_content_unset(Evas_Object *obj)
    evas_object_image_smooth_scale_set(cw->obj, e_comp_config_get()->smooth_windows);
    evas_object_name_set(cw->obj, "cw->obj");
    evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
+   evas_object_intercept_color_set_callback_add(obj, _e_comp_intercept_obj_color_set, cw);
    _e_comp_object_alpha_set(cw);
 
    if (cw->shobj)
@@ -5924,6 +5978,8 @@ e_comp_object_content_unset(Evas_Object *obj)
    e_comp_object_render(cw->smart_obj);
    e_comp_object_render_update_add(obj);
 
+   wl_signal_emit(&cw->events.content_type_set, NULL);
+
    return EINA_TRUE;
 }
 
@@ -6330,6 +6386,8 @@ e_comp_object_image_filter_set(Evas_Object *obj, E_Comp_Image_Filter filter)
    if (e_object_is_del(E_OBJECT(cw->ec))) return EINA_FALSE;
    if (!e_client_cdata_get(cw->ec)) return EINA_FALSE;
 
+   if (cw->image_filter == filter) return EINA_TRUE;
+
    switch (filter)
      {
       case E_COMP_IMAGE_FILTER_BLUR:
@@ -6349,6 +6407,8 @@ e_comp_object_image_filter_set(Evas_Object *obj, E_Comp_Image_Filter filter)
 
    cw->image_filter = filter;
 
+   wl_signal_emit(&cw->events.image_filter_set, NULL);
+
    return EINA_TRUE;
 }
 
@@ -6441,27 +6501,8 @@ EINTERN Eina_Bool
 e_comp_object_color_visible_get(Evas_Object *obj)
 {
    API_ENTRY EINA_FALSE;
-   int a;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
 
-   e_comp_object_color_get(obj, NULL, NULL, NULL, &a);
-   if (a <= 0)
-     return EINA_FALSE;
-
-   evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
-   if (a <= 0)
-     return EINA_FALSE;
-
-   evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
-   if (a <= 0)
-     return EINA_FALSE;
-
-   evas_object_color_get(cw->obj, NULL, NULL, NULL, &a);
-   if (a <= 0)
-     return EINA_FALSE;
-
-   return EINA_TRUE;
+   return cw->color_visible;
 }
 
 E_API Eina_Bool
@@ -6493,14 +6534,26 @@ e_comp_object_map_enable_set(Evas_Object *obj, Eina_Bool enable)
 E_API Eina_Bool
 e_comp_object_render_update_lock(Evas_Object *obj)
 {
+   E_Comp_Wl_Buffer *buffer;
+   struct wayland_tbm_client_queue *cqueue;
+
    API_ENTRY EINA_FALSE;
 
    if (cw->render_update_lock.lock == 0)
      {
         _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET, cw->ec);
-        e_comp_wl_buffer_reference(&cw->render_update_lock.buffer_ref,
-                                   e_pixmap_resource_get(cw->ec->pixmap));
+
+        buffer = e_pixmap_resource_get(cw->ec->pixmap);
+        if ((buffer) && (buffer->resource))
+          {
+             cqueue = e_comp_wl_tbm_client_queue_get(cw->ec);
+             if (cqueue)
+               wayland_tbm_server_client_queue_flush(cqueue);
+          }
+
+        e_comp_wl_buffer_reference(&cw->render_update_lock.buffer_ref, buffer);
         e_comp_object_render_update_del(obj);
+
         ELOGF("COMP", "Render update lock enabled", cw->ec);
      }
 
@@ -6551,6 +6604,8 @@ e_comp_object_render_update_unlock(Evas_Object *obj)
         else
           e_comp_object_render_update_add(obj);
 
+        _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_UNSET, cw->ec);
+
         ELOGF("COMP", "Render update lock disabled", cw->ec);
      }
 }
@@ -6571,7 +6626,7 @@ e_comp_object_color_get(Evas_Object *obj, int *r, int *g, int *b, int *a)
 {
    API_ENTRY;
 
-   if (cw->transparent.set)
+   if ((cw->transparent.set) || (cw->transparent.setting))
      {
         if (r) *r = cw->transparent.user_r;
         if (g) *g = cw->transparent.user_g;
@@ -6583,3 +6638,130 @@ e_comp_object_color_get(Evas_Object *obj, int *r, int *g, int *b, int *a)
         evas_object_color_get(obj, r, g, b, a);
      }
 }
+
+EINTERN void
+e_comp_object_render_op_set(Evas_Object *obj, Evas_Render_Op op)
+{
+   API_ENTRY;
+
+   evas_object_render_op_set(cw->obj, op);
+
+   wl_signal_emit(&cw->events.render_op_set, NULL);
+}
+
+EINTERN Evas_Render_Op
+e_comp_object_render_op_get(Evas_Object *obj)
+{
+   API_ENTRY EVAS_RENDER_BLEND;
+
+   return evas_object_render_op_get(cw->obj);
+}
+
+EINTERN void
+e_comp_object_lower_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.lower, listener);
+}
+
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_lower_done_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.lower_done, listener);
+}
+
+EINTERN void
+e_comp_object_raise_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.raise, listener);
+}
+#endif
+
+EINTERN void
+e_comp_object_show_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.show, listener);
+}
+
+EINTERN void
+e_comp_object_hide_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.hide, listener);
+}
+
+EINTERN void
+e_comp_object_hiding_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.hiding, listener);
+}
+
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+e_comp_object_set_layer_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.set_layer, listener);
+}
+
+EINTERN void
+e_comp_object_stack_above_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.stack_above, listener);
+}
+
+EINTERN void
+e_comp_object_stack_below_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.stack_below, listener);
+}
+#endif
+
+EINTERN void
+e_comp_object_image_filter_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.image_filter_set, listener);
+}
+
+EINTERN void
+e_comp_object_render_op_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.render_op_set, listener);
+}
+
+EINTERN void
+e_comp_object_content_type_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.content_type_set, listener);
+}
+
+EINTERN void
+e_comp_object_color_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.color_set, listener);
+}
+
+EINTERN void
+e_comp_object_color_visible_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.color_visible_set, listener);
+}
+
+EINTERN void
+e_comp_object_resize_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.resize, listener);
+}