e_comp_wl: make sure setting alpha and creating a bg rect for subsurface 03/87403/4
authorBoram Park <boram1288.park@samsung.com>
Thu, 8 Sep 2016 01:17:01 +0000 (10:17 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 12 Sep 2016 11:15:05 +0000 (04:15 -0700)
Sometimes, the parent's commit never happens after the subsurface's commit.
In this case, the setting alpha and creating a bg rect could be skipped.

Change-Id: I6be1a8e554f4ed44d040e92e245af9afbf5761b7

src/bin/e_comp_wl.c

index b038336..bad425d 100644 (file)
@@ -3293,8 +3293,17 @@ _e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
    Eina_Bool has_video_client;
    short layer;
 
+   if (!ec || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
    if (ec->comp_data->sub.below_obj) return;
-   if (ec->comp_data->sub.data) return;
+   if (ec->comp_data->sub.data)
+     {
+         E_Client *topmost;
+         if (ec->comp_data->sub.below_list || ec->comp_data->sub.below_list_pending)
+           return;
+         topmost = _e_comp_wl_topmost_parent_get(ec);
+         _e_comp_wl_subsurface_check_below_bg_rectangle(topmost);
+         return;
+     }
    if (!ec->comp_data->sub.below_list && !ec->comp_data->sub.below_list_pending) return;
    if (ec->argb) return;
 
@@ -3323,6 +3332,9 @@ _e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
 
    _e_comp_wl_subsurface_restack(ec);
    _e_comp_wl_subsurface_restack_bg_rectangle(ec);
+
+   if (evas_object_visible_get(ec->frame))
+     evas_object_show(ec->comp_data->sub.below_obj);
 }
 
 static void