Delay first showing of client object while damage count up to 2.
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Fri, 6 Mar 2015 06:01:28 +0000 (15:01 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 18 Mar 2015 04:03:08 +0000 (13:03 +0900)
Change-Id: Idc0d3031673fc7171780fb8e556cb9af39b708f2

src/bin/e_comp_object.c
src/bin/e_comp_x.c
src/bin/e_comp_x.h

index c64c14a6ca454a3486dcb0272c4adf08608e5103..f51dcacf6142ac8264309ab9e07ec5aa69b62456 100644 (file)
@@ -1414,10 +1414,23 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
    /* only do the show if show is allowed */
    if (!cw->real_hid)
      {
+#ifndef HAVE_WAYLAND_ONLY
+        E_Comp_X_Client_Data *cd = NULL;
+        cd = (E_Comp_X_Client_Data*)cw->ec->comp_data;
+#endif
         if (cw->ec->internal) //internal clients render when they feel like it
           e_comp_object_damage(cw->smart_obj, 0, 0, cw->w, cw->h);
+#ifndef HAVE_WAYLAND_ONLY
+        if (ecore_x_icccm_state_get(e_client_util_win_get(cw->ec)) != ECORE_X_WINDOW_STATE_HINT_NORMAL)
+          e_hints_window_visible_set(cw->ec);
+#endif
 
-        if (!cw->update_count || !(e_pixmap_validate_check(cw->ec->pixmap)))
+        if (!cw->update_count || !(e_pixmap_validate_check(cw->ec->pixmap))
+#ifndef HAVE_WAYLAND_ONLY
+            || !(cd->damage_count>1))
+#else
+            )
+#endif
           return;
 
         evas_object_show(cw->smart_obj);
index 2304ba78e05b88aba1969c5c22383901be55aa5b..81c0d61ebd1f32929a05ebb85ba0f1ce32c40c8e 100644 (file)
@@ -2564,6 +2564,8 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam
      }
    //WRN("DAMAGE %p: %dx%d", ec, ev->area.width, ev->area.height);
 
+   ec->comp_data->damage_count++;
+
    if (ec->comp->nocomp)
      e_pixmap_dirty(ec->pixmap);
    /* discard unwanted xy position of first damage
@@ -2577,6 +2579,7 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam
    else
      E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del);
    ec->comp_data->first_damage = 1;
+
    return ECORE_CALLBACK_RENEW;
 }
 
index a724a7c9e21759c747eddf68e102c8cd03cfedba..1936eba14312f1a8c015df27709559aed27cfa73 100644 (file)
@@ -38,6 +38,7 @@ struct _E_Comp_X_Client_Data
 
    Ecore_Timer *first_draw_delay; //configurable placebo
    Eina_Bool first_damage : 1; //ignore first damage on non-re_manage clients
+   unsigned int damage_count;
 
    struct
    {