e_client: Add visibility force_obscured feature 46/97646/9
authorSeungjin Park <sj8808.park@samsung.com>
Tue, 15 Nov 2016 02:14:53 +0000 (11:14 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 29 Nov 2016 11:29:32 +0000 (03:29 -0800)
Change-Id: Ic160f5f96ce6eca6ddae5672481274a4095819ab
Signed-off-by: Seungjin Park <sj8808.park@samsung.com>
src/bin/e_client.c
src/bin/e_client.h
src/bin/e_policy_wl.c

index 8b006d928c08f6a1aa919a4d4608132f74eedead..4f6f20521b0bb29c29bd11dfa62598a431db1937 100644 (file)
@@ -2954,7 +2954,8 @@ _e_client_visibility_zone_calculate(E_Zone *zone)
 
         if (canvas_vis)
           {
-             if (calc_region || skip_rot_pending_show)
+             if ((calc_region || skip_rot_pending_show) &&
+                 (!ec->visibility.force_obscured))
                {
                   it = eina_tiler_iterator_new(t);
                   EINA_ITERATOR_FOREACH(it, _r)
@@ -3017,7 +3018,7 @@ _e_client_visibility_zone_calculate(E_Zone *zone)
              /* It prevents unwanted iconification of the top visible window
               * while showing an window with rotation mode.
               */
-             if (!skip_rot_pending_show)
+             if ((!skip_rot_pending_show) || (ec->visibility.force_obscured))
                {
                   /* obscured case */
                   if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
@@ -6434,3 +6435,14 @@ e_remember_del(void *rem)
    /* do nothing */
    return;
 }
+
+E_API void
+e_client_visibility_force_obscured_set(E_Client *ec, Eina_Bool set)
+{
+   EINA_SAFETY_ON_NULL_RETURN(ec);
+
+   ELOGF("TZVIS", "VIS_FORCE_OBSCURED :%d", ec->pixmap, ec, set);
+
+   ec->visibility.force_obscured = set;
+   e_client_visibility_calculate();
+}
index f4942fade15f73e87c1e80af48948acb21a0405e..ff5106bde35c0c8384e05b34e3ec8b92297ae165 100644 (file)
@@ -676,6 +676,7 @@ struct E_Client
       int obscured;
       unsigned char changed : 1;
       Eina_Bool skip : 1;
+      Eina_Bool force_obscured : 1;
    } visibility;
 
    struct
@@ -1065,6 +1066,8 @@ E_API Eina_Bool e_client_cursor_hide(E_Client *ec);
 
 E_API void e_remember_del(void *rem); /* TODO: should be removed */
 
+E_API void e_client_visibility_force_obscured_set(E_Client *ec, Eina_Bool set);
+
 /**
  * Move window to coordinates that do not account client decorations yet.
  *
index 89ddda6c9385457ff33b39786501cb64c87665ab..9889920555350550e47363c5d7dae344c4aa21a0 100644 (file)
@@ -1261,7 +1261,7 @@ _tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resourc
 
    ELOGF("TZPOL", "ACTIVATE", ec->pixmap, ec);
 
-   if ((!starting) && (!ec->focused))
+   if ((!starting) && (!ec->focused) && (!ec->visibility.force_obscured))
      {
         if (!e_policy_visibility_client_activate(ec))
           {
@@ -2124,6 +2124,12 @@ _tzpol_iface_cb_uniconify(struct wl_client *client EINA_UNUSED, struct wl_resour
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
+   if (ec->visibility.force_obscured)
+     {
+        ec->exp_iconify.by_client = 0;
+        return;
+     }
+
    if (e_policy_visibility_client_uniconify(ec, 1))
      return;