remove code related with ec->shading 42/304142/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 10 Jan 2024 08:39:37 +0000 (17:39 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 10 Jan 2024 13:50:46 +0000 (22:50 +0900)
Change-Id: I33c0f8d68e69f9609227ae11866dd90dae936613

src/bin/e_client.c
src/bin/e_client.h
src/bin/e_comp_object.c
src/bin/e_comp_wl.c

index 42eac52..340fe30 100644 (file)
@@ -2265,8 +2265,7 @@ _e_client_eval(E_Client *ec)
    if (ec->changes.size)
      {
         ec->changes.size = 0;
-        if ((!ec->shading))
-          evas_object_resize(ec->frame, ec->w, ec->h);
+        evas_object_resize(ec->frame, ec->w, ec->h);
 
         prop |= E_CLIENT_PROPERTY_SIZE;
      }
@@ -4259,8 +4258,6 @@ e_client_maximize(E_Client *ec, E_Maximize max)
 
    if (!(max & E_MAXIMIZE_DIRECTION)) max |= E_MAXIMIZE_BOTH;
 
-   if ((ec->shading)) return;
-
    if ((ec->maximized & E_MAXIMIZE_DIRECTION) == (max & E_MAXIMIZE_DIRECTION))
      {
         if ((ec->maximized & E_MAXIMIZE_TYPE) == (max & E_MAXIMIZE_TYPE))
@@ -4313,8 +4310,6 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
         return;
      }
 
-   if ((ec->shading)) return;
-
    /* Remove directions not used */
    max &= (ec->maximized & E_MAXIMIZE_DIRECTION);
    /* Can only remove existing maximization directions */
@@ -4340,7 +4335,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
    E_OBJECT_CHECK(ec);
    E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
 
-   if ((ec->shading) || (ec->fullscreen)) return;
+   if (ec->fullscreen) return;
 
    // call the fullscreen_pre hook of a client
    wl_signal_emit_mutable(&PRI(ec)->events.fullscreen_pre, NULL);
@@ -4374,7 +4369,6 @@ e_client_unfullscreen(E_Client *ec)
 
    ec->need_fullscreen = 0;
 
-   if ((ec->shading)) return;
    if (!ec->fullscreen) return;
 
    ec->fullscreen = 0;
@@ -4418,7 +4412,7 @@ e_client_iconify(E_Client *ec)
          ec, ec->iconic, ec->argb, (unsigned int)ec->exp_iconify.not_raise,
          ec->exp_iconify.by_client, ec->exp_iconify.type);
 
-   if (ec->shading || ec->iconic) return;
+   if (ec->iconic) return;
    if (ec->exp_iconify.skip_iconify && !iconified_by_client) return;
    if (ec->exp_iconify.skip_by_remote) return;
    if (!cdata || !cdata->mapped)
@@ -4457,7 +4451,7 @@ e_client_uniconify(E_Client *ec)
          ec->exp_iconify.by_client, ec->exp_iconify.type,
          cdata ? cdata->mapped : 0);
 
-   if (ec->shading || (!ec->iconic)) return;
+   if (!ec->iconic) return;
 
    TRACE_DS_BEGIN(CLIENT:UNICONIFY);
 
@@ -4706,7 +4700,7 @@ e_client_act_resize_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev, E_Poin
 {
    E_OBJECT_CHECK(ec);
    E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
-   if (ec->lock_user_size || ec->shading) return;
+   if (ec->lock_user_size) return;
    if (e_client_util_resizing_get(ec) || (ec->moving)) return;
    if (ev)
      {
@@ -4879,8 +4873,7 @@ e_client_resize_cancel(void)
 EINTERN Eina_Bool
 e_client_resize_begin(E_Client *ec)
 {
-   if ((ec->shading) ||
-       (ec->fullscreen) || (ec->lock_user_size))
+   if ((ec->fullscreen) || (ec->lock_user_size))
      goto error;
    if (!_e_client_action_input_win_new()) goto error;
    ecresize = ec;
index 66e0e0e..8b2ae01 100644 (file)
@@ -752,7 +752,6 @@ struct E_Client
    unsigned int       new_client : 1;
    unsigned int       re_manage : 1; // client is persisting from before E restart
    unsigned int       placed : 1;
-   unsigned int       shading : 1;
    unsigned int       iconic : 1;
    unsigned int       deskshow : 1;
    unsigned int       sticky : 1;
index dd7f2ec..c9405d7 100644 (file)
@@ -1581,20 +1581,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))
-          {
-             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;
-          }
+
+        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 */
@@ -1618,11 +1615,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;
@@ -1660,7 +1655,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) 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))
@@ -1688,33 +1682,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))
+
+        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 - 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 - 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))
      {
@@ -1741,13 +1733,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))
-     {
-        /* 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.
@@ -1771,7 +1760,7 @@ _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->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);
@@ -2811,7 +2800,6 @@ _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) return;
    if (cw->ec->fullscreen)
      {
         zone = e_comp_zone_find_by_ec(cw->ec);
@@ -2829,19 +2817,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_unshading(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
 {
    E_Comp_Object *cw = data;
@@ -3158,7 +3133,6 @@ _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, "unshading", _e_comp_smart_cb_unshading, cw);
    evas_object_smart_callback_add(obj, "unshaded", _e_comp_smart_cb_unshaded, cw);
 
@@ -3424,44 +3398,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))
-     {
-        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();
index 4053737..ef66e88 100644 (file)
@@ -2126,7 +2126,6 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event
 
    if (!(ec = data)) return;
 
-   if ((ec->shading)) return;
    if (!ec->comp_data->shell.configure_send) return;
 
    /* TODO: calculate x, y with transfrom object */