e_policy: send pre-unobscured event before sending unobscured event 97/165397/4
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 28 Dec 2017 23:26:55 +0000 (08:26 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 29 Dec 2017 01:51:57 +0000 (10:51 +0900)
we add code to send pre-unobscured event if it was not sent before sending unobscured event.
this is guarantee for sequence of visibility (pre-unobscured -> unobscured).

Change-Id: I5e9a4c8ef7e651abe287bfebea2c5f089241bece

src/bin/e_policy.c
src/bin/e_policy_visibility.c
src/bin/e_policy_visibility.h

index 556b963..6239a37 100644 (file)
@@ -865,6 +865,11 @@ _e_policy_cb_hook_client_visibility(void *d EINA_UNUSED, E_Client *ec)
         if (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
           {
              e_policy_client_uniconify_by_visibility(ec);
+             if (ec->visibility.last_sent_type != E_VISIBILITY_PRE_UNOBSCURED)
+               {
+                  ELOGF("POL_VIS", "SEND pre-unobscured visibility event", ec->pixmap, ec);
+                  e_vis_client_send_pre_visibility_event(ec);
+               }
              e_policy_client_visibility_send(ec);
           }
         else
index 7da4353..5ae4c78 100644 (file)
@@ -1014,8 +1014,8 @@ _e_vis_client_prepare_foreground_signal_emit(E_Vis_Client *vc)
    evas_object_smart_callback_call(vc->ec->frame, "e,visibility,prepare,foreground", vc->ec);
 }
 
-static void
-_e_vis_client_send_pre_visibility_event(E_Client *ec)
+EINTERN void
+e_vis_client_send_pre_visibility_event(E_Client *ec)
 {
    if (!ec) return;
    e_policy_wl_visibility_send(ec, E_VISIBILITY_PRE_UNOBSCURED);
@@ -1035,7 +1035,7 @@ _e_vis_client_is_uniconify_render_necessary(E_Vis_Client *vc)
         VS_INF(ec, "Not necessary deiconify rendering");
 
         ELOGF("POL", "SEND pre-unobscured visibility event", ec->pixmap, ec);
-        _e_vis_client_send_pre_visibility_event(ec);
+        e_vis_client_send_pre_visibility_event(ec);
 
         return EINA_FALSE;
      }
@@ -1134,7 +1134,7 @@ _e_vis_client_add_uniconify_render_pending(E_Vis_Client *vc, E_Vis_Job_Type type
    if (send_vis_event)
      {
         ELOGF("POL", "SEND pre-unobscured visibility event", ec->pixmap, ec);
-        _e_vis_client_send_pre_visibility_event(ec);
+        e_vis_client_send_pre_visibility_event(ec);
      }
 
    _e_vis_client_prepare_foreground_signal_emit(vc);
@@ -1408,7 +1408,7 @@ _e_vis_ec_below_uniconify(E_Client *ec)
                     }
 
                   ELOGF("POL", "SEND pre-unobscured visibility event", below_ec->pixmap, below_ec);
-                  _e_vis_client_send_pre_visibility_event(below_ec);
+                  e_vis_client_send_pre_visibility_event(below_ec);
                }
 
              job_added = _e_vis_client_add_uniconify_render_pending(below, E_VIS_JOB_TYPE_UNICONIFY_BY_VISIBILITY, 0);
index 143127a..087bab1 100644 (file)
@@ -34,6 +34,7 @@ E_API void                        e_policy_visibility_hook_del(E_Pol_Vis_Hook *h
 E_API Eina_Bool                   e_policy_visibility_client_is_iconic(E_Client *ec);
 
 EINTERN void                      e_policy_visibility_client_defer_move(E_Client *ec);
+EINTERN void                      e_vis_client_send_pre_visibility_event(E_Client *ec);
 
 #endif
 #endif