visibility: send pre-unobscured event when the window is first mapped 77/173777/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 8 Mar 2018 07:16:09 +0000 (16:16 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 26 Mar 2018 01:49:56 +0000 (10:49 +0900)
Change-Id: Ib7ac7ff9db4eeb747541ea9689ddc932a1047ca3

src/bin/e_policy_visibility.c
src/bin/e_policy_visibility.h
src/modules/wl_desktop_shell/e_mod_main.c

index ca1f585e7818abe99030421cccd1076509fae3b7..3c6ffab9536bbda067071ff22387799422ca7711 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);
 }
 
+E_API 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 0669987c00db89cc31bc6b71601bec58f8b7d351..c13427c08792353ce127d6389c6ccd78cc720784 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);
+E_API   void                      e_vis_client_check_send_pre_visibility_event(E_Client *ec, Eina_Bool raise);
 
 #endif
 #endif
index 7971e485f8c1ab5cc7f2788e5b7dbd8ad6b9618a..91ce7729066ea6caa09ec6ec2d408bfeb668d352 100644 (file)
@@ -548,6 +548,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;