visibility: send pre-unobscured event when the window is first mapped 28/171928/2 accepted/tizen/unified/20180308.123315 submit/tizen/20180308.072452
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 8 Mar 2018 07:02:07 +0000 (16:02 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 8 Mar 2018 07:06:18 +0000 (07:06 +0000)
Change-Id: Ib8a530dd4cc7b711b6f58bf74eaba00cd20ca4e3

src/bin/e_comp_wl_shell.c
src/bin/e_policy_visibility.c
src/bin/e_policy_visibility.h

index 2d78f56..9a370e8 100644 (file)
@@ -547,6 +547,7 @@ _e_shell_client_map_common_post(E_Client *ec)
      }
 
    e_policy_visibility_client_hide_job_cancel(ec);
+   e_vis_client_check_send_pre_visibility_event(ec, EINA_FALSE);
 
    ELOGF("COMP", "Un-Set launching flag", ec->pixmap, ec);
    ec->launching = EINA_FALSE;
index ca1f585..a285e9c 100644 (file)
@@ -51,6 +51,7 @@ static Eina_Bool         _e_vis_ec_below_uniconify(E_Client *ec);
 static void              _e_vis_cb_child_launch_done(void *data, Evas_Object *obj, const char *signal, const char *source);
 static void              _e_vis_update_foreground_job_queue(void);
 static void              _e_vis_update_forground_list(void);
+static Eina_Bool         _e_vis_client_check_send_pre_visibility(E_Vis_Client *vc, Eina_Bool raise);
 
 static E_Vis            *pol_vis = NULL;
 /* the list for E_Vis_Job */
@@ -1101,6 +1102,20 @@ e_vis_client_send_pre_visibility_event(E_Client *ec)
    e_policy_wl_visibility_send(ec, E_VISIBILITY_PRE_UNOBSCURED);
 }
 
+EINTERN void
+e_vis_client_check_send_pre_visibility_event(E_Client *ec, Eina_Bool raise)
+{
+   if (!ec) return;
+
+   E_VIS_CLIENT_GET_OR_RETURN(vc, ec);
+
+   if (_e_vis_client_check_send_pre_visibility(vc, raise))
+     {
+        ELOGF("POL_VIS", "SEND pre-unobscured visibility event", ec->pixmap, ec);
+        e_vis_client_send_pre_visibility_event(ec);
+     }
+}
+
 static Eina_Bool
 _e_vis_client_is_uniconify_render_necessary(E_Vis_Client *vc)
 {
@@ -1249,6 +1264,9 @@ _e_vis_client_check_send_pre_visibility(E_Vis_Client *vc, Eina_Bool raise)
    if (_e_vis_client_is_uniconic(vc))
      return EINA_FALSE;
 
+   if (ec->zone->display_state == E_ZONE_DISPLAY_STATE_OFF)
+     return EINA_FALSE;
+
    // check all windows on above layers, if obscured by above then return FALSE
    if (_e_vis_client_check_obscured_by_above_layers(ec))
      {
index 0669987..742a666 100644 (file)
@@ -37,6 +37,7 @@ E_API Eina_Bool                   e_policy_visibility_client_is_iconic(E_Client
 
 EINTERN void                      e_policy_visibility_client_defer_move(E_Client *ec);
 EINTERN void                      e_vis_client_send_pre_visibility_event(E_Client *ec);
+EINTERN void                      e_vis_client_check_send_pre_visibility_event(E_Client *ec, Eina_Bool raise);
 
 #endif
 #endif