e_client: use e_client_visibility_set/get funtions 06/307106/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 4 Mar 2024 05:04:00 +0000 (14:04 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 5 Mar 2024 02:11:36 +0000 (11:11 +0900)
E20 uses these two functions instead of getting the
member variable of e_client directly.

Change-Id: I577cfab64e28c6db6aae384c9e45d9f5b8ede1d9

22 files changed:
src/bin/e_client.c
src/bin/e_comp_wl.c
src/bin/e_comp_wl_rsm.c
src/bin/e_comp_wl_shell.c
src/bin/e_desk.c
src/bin/e_focus_policy_history.c
src/bin/e_focus_policy_topmost.c
src/bin/e_info_server.c
src/bin/e_keyrouter_events.c
src/bin/e_output.c
src/bin/e_pointer.c
src/bin/e_policy.c
src/bin/e_policy_visibility.c
src/bin/e_policy_wl.c
src/bin/e_policy_wl_display.c
src/bin/e_process.c
src/bin/e_test_helper.c
src/bin/e_zone.c
src/bin/services/e_service_launcher.c
src/bin/video/e_client_video.c
src/bin/video/e_comp_wl_video.c
src/bin/video/iface/e_video_hwc.c

index 509764b..2a427ff 100644 (file)
@@ -2600,7 +2600,7 @@ e_client_transient_child_top_get(E_Client *ec, Eina_Bool consider_focus)
 #ifdef EC_IS_NOT_VISIBLE
 # undef EC_IS_NOT_VISIBLE
 #endif
-#define EC_IS_NOT_VISIBLE if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
+#define EC_IS_NOT_VISIBLE if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED)
 
 EINTERN Eina_Bool
 e_client_visibility_touched_check(E_Client *ec)
@@ -2650,7 +2650,7 @@ e_client_visibility_set(E_Client *ec, E_Visibility visibility)
 {
    EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   if (ec->visibility.obscured == visibility) return;
+   if (e_client_visibility_get(ec) == visibility) return;
 
    ec->visibility.obscured = visibility;
 }
@@ -7434,7 +7434,7 @@ e_client_hide(E_Client *ec)
              if (ec->show_pending.running)
                {
                   // need to send visibility false;
-                  ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+                  e_client_visibility_set(ec, E_VISIBILITY_UNOBSCURED);
                   ELOGF("POL_VIS", "CLIENT VIS ON (fake).  argb:%d, opaque:%2d", ec, ec->argb, ec->visibility.opaque);
                   EC_CHANGED(ec);
                }
index 9173b66..dfea164 100644 (file)
@@ -1552,7 +1552,7 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
    struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
    if (!surface) return;
 
-   if ((!need_send_motion) && (!need_send_released) && (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)) return;
+   if ((!need_send_motion) && (!need_send_released) && (e_client_visibility_get(ec) == E_VISIBILITY_FULLY_OBSCURED)) return;
 
    dev = ev->dev;
    dev_name = evas_device_description_get(dev);
index afb5b27..90e4091 100644 (file)
@@ -327,8 +327,8 @@ _remote_provider_onscreen_parent_calculate(E_Comp_Wl_Remote_Provider *provider)
         if (!_ec->frame) continue;
         if (!_ec->visible) continue;
         if (_ec->visibility.skip) continue;
-        if ((_ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) &&
-            (_ec->visibility.obscured != E_VISIBILITY_PARTIALLY_OBSCURED))
+        if ((e_client_visibility_get(_ec) != E_VISIBILITY_UNOBSCURED) &&
+            (e_client_visibility_get(_ec) != E_VISIBILITY_PARTIALLY_OBSCURED))
           continue;
         if (e_comp_wl_subsurface_check(_ec)) continue;
 
@@ -440,7 +440,7 @@ _remote_provider_visible_set(E_Comp_Wl_Remote_Provider *provider, Eina_Bool set)
 
         if (provider->vis_ref == 1)
           {
-             provider->common.ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+             e_client_visibility_set(provider->common.ec, E_VISIBILITY_UNOBSCURED);
 
              _remote_provider_visible_event_send(provider);
              e_policy_client_visibility_send(provider->common.ec);
@@ -461,7 +461,7 @@ _remote_provider_visible_set(E_Comp_Wl_Remote_Provider *provider, Eina_Bool set)
 
         if (provider->vis_ref == 0)
           {
-             provider->common.ec->visibility.obscured = E_VISIBILITY_FULLY_OBSCURED;
+             e_client_visibility_set(provider->common.ec, E_VISIBILITY_FULLY_OBSCURED);
 
              _remote_provider_visible_event_send(provider);
              e_policy_client_visibility_send(provider->common.ec);
index 22a16d4..ed76cda 100644 (file)
@@ -396,7 +396,7 @@ e_shell_e_client_destroy(E_Client *ec)
    if (e_policy_visibility_client_grab_cancel(ec))
      {
         ELOGF("POL_VIS", "CLIENT VIS ON(temp).", ec);
-        ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+        e_client_visibility_set(ec, E_VISIBILITY_UNOBSCURED),
         ec->visibility.changed = 1;
      }
 
index b58d8e6..7f15813 100644 (file)
@@ -1120,7 +1120,7 @@ _e_desk_zoom_animate_cb(void *data, double pos)
 
    EINA_LIST_FOREACH(sd->clients, l, ec)
      {
-        if ((ec->visibility.obscured == E_VISIBILITY_UNOBSCURED) ||
+        if ((e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED) ||
             (e_comp_wl_subsurface_check(ec)))
           _e_desk_client_zoom(ec, zoomx, zoomy, cx, cy);
      }
@@ -1515,8 +1515,8 @@ e_desk_visible_client_iconify_all(E_Desk *desk)
         if (!ec->visible) continue;
         if (ec->netwm.type == E_WINDOW_TYPE_DESKTOP) continue;
         if (e_client_desk_iconify_skip_get(ec)) continue;
-        if (ec->visibility.obscured == E_VISIBILITY_UNKNOWN) continue;
-        if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
+        if (e_client_visibility_get(ec) == E_VISIBILITY_UNKNOWN) continue;
+        if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED)
           {
              if (e_client_is_iconified_by_client(ec))
                continue;
index 0e8cccc..a8c872b 100644 (file)
@@ -206,7 +206,7 @@ _e_focus_policy_history_candidate_focus_get(E_Focus_Policy_History *history_poli
         if (!(cec = e_client_check_obscured_by_children_group(ec)) ||
             e_client_check_really_iconified(cec))
           {
-             if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) continue;
+             if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED) continue;
              if (e_client_check_fully_contain_by_above(ec, EINA_FALSE)) continue;
           }
 
@@ -239,7 +239,7 @@ _e_focus_policy_history_candidate_focus_get(E_Focus_Policy_History *history_poli
 static Eina_Bool
 _e_focus_policy_history_focus_can_take_by_vis_obscured(E_Focus_Policy_History *history_policy, E_Client *ec)
 {
-   switch (ec->visibility.obscured)
+   switch (e_client_visibility_get(ec))
      {
        case E_VISIBILITY_UNKNOWN:
            if (e_client_check_really_iconified(ec))
@@ -805,7 +805,7 @@ _focus_policy_history_cb_client_activate_done(struct wl_listener *listener, void
     if (!obscured_above)
       {
          if (!e_policy_visibility_client_is_uniconic(ec) ||
-             (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED))
+             (e_client_visibility_get(ec) == E_VISIBILITY_FULLY_OBSCURED))
            {
               _e_focus_policy_history_focus_focus_defer_set(history_policy, focus_ec);
               _focus_policy_history_focus_stack_latest_set(history_policy, focus_ec);
index f90ebf5..ed24f4a 100644 (file)
@@ -52,7 +52,7 @@ struct _E_Focus_Policy_Topmost_Client
 static Eina_Bool
 _e_focus_policy_topmost_focus_can_take_by_vis_obscured(E_Client *ec)
 {
-   switch (ec->visibility.obscured)
+   switch (e_client_visibility_get(ec))
      {
        case E_VISIBILITY_UNKNOWN:
        case E_VISIBILITY_FULLY_OBSCURED:
index 7e1183f..ec59ab7 100644 (file)
@@ -402,7 +402,7 @@ _msg_ecs_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
             pid,
             e_client_util_name_get(ec) ?: "NO NAME",
             x, y, w, h, ec->layer,
-            ec->visible, mapped, ec->argb, ec->visibility.opaque, ec->visibility.obscured, ec->visibility.force_obscured, iconified,
+            ec->visible, mapped, ec->argb, ec->visibility.opaque, e_client_visibility_get(ec), ec->visibility.force_obscured, iconified,
             evas_object_visible_get(ec->frame), ec->focused, hwc, hwc_policy, pl_zpos, pwin, layer_name, has_input_region, transformed, ec->transient_policy,
             zone_id, ec->apply_layout);
 
@@ -505,7 +505,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
             pid,
             e_client_util_name_get(ec) ?: "NO NAME",
             ec->x, ec->y, ec->w, ec->h, ec->layer,
-            ec->visible, mapped, ec->argb, ec->visibility.opaque, ec->visibility.obscured, ec->visibility.force_obscured, iconified,
+            ec->visible, mapped, ec->argb, ec->visibility.opaque, e_client_visibility_get(ec), ec->visibility.force_obscured, iconified,
             evas_object_visible_get(ec->frame), ec->focused, hwc, hwc_policy, pl_zpos, pwin, layer_name, has_input_region, transformed, ec->transient_policy,
             zone_id, ec->apply_layout);
 
@@ -6054,7 +6054,7 @@ _e_info_server_wininfo_tree_info_add(E_Client *ec, Eldbus_Message_Iter *iter,
              if (recurse)
                num_child = eina_list_count(child->transients);
 
-             if ((!child->iconic) && (!child->visibility.obscured) &&
+             if ((!child->iconic) && (!e_client_visibility_get(child)) &&
                  evas_object_visible_get(ec->frame))
                _e_info_server_ec_hwc_info_get(child, &hwc, &hwc_policy, &pl_zpos);
 
@@ -6166,7 +6166,7 @@ _e_info_server_cb_wininfo(const Eldbus_Service_Interface *iface EINA_UNUSED, con
 
    eldbus_message_arguments_append(reply, VALUE_TYPE_REPLY_WININFO, res_id, pid,
                                    ec->x, ec->y, ec->w, ec->h, ec->layer, ec->visible,
-                                   ec->argb, ec->visibility.opaque, ec->visibility.obscured,
+                                   ec->argb, ec->visibility.opaque, e_client_visibility_get(ec),
                                    ec->iconic, evas_object_visible_get(ec->frame),
                                    ec->focused, hwc, pl_zpos, (uint64_t)pwin,
                                    layer_name, xright, ybelow, ec->border_size,
index b5eac53..0b6eb63 100644 (file)
@@ -5,6 +5,7 @@
 #include "e_utils_intern.h"
 #include "e_screensaver_intern.h"
 #include "e_config_intern.h"
+#include "e_client_intern.h"
 
 #include <tizen-extension-server-protocol.h>
 
@@ -857,7 +858,7 @@ _e_keyrouter_check_top_visible_window(E_Client *ec_focus, int arr_idx)
 
    while (ec_top)
      {
-        if (ec_top->visibility.obscured != E_VISIBILITY_UNOBSCURED)
+        if (e_client_visibility_get(ec_top) != E_VISIBILITY_UNOBSCURED)
           {
              if (ec_top == ec_focus)
                {
index 81fa25a..5e11392 100644 (file)
@@ -205,7 +205,7 @@ _e_output_zoom_top_visible_ec_get()
         if (e_client_util_ignored_get(ec)) continue;
         if (ec->iconic) continue;
         if (ec->visible == 0) continue;
-        if (!(ec->visibility.obscured == 0 || ec->visibility.obscured == 1)) continue;
+        if (!(e_client_visibility_get(ec) == 0 || e_client_visibility_get(ec) == 1)) continue;
         if (!ec->frame) continue;
         if (!evas_object_visible_get(ec->frame)) continue;
         if (e_comp_wl_subsurface_check(ec)) continue;
@@ -555,7 +555,7 @@ _e_output_top_visible_ec_get()
         if (e_client_util_ignored_get(ec)) continue;
         if (ec->iconic) continue;
         if (ec->visible == 0) continue;
-        if (!(ec->visibility.obscured == 0 || ec->visibility.obscured == 1)) continue;
+        if (!(e_client_visibility_get(ec) == 0 || e_client_visibility_get(ec) == 1)) continue;
         if (!ec->frame) continue;
         if (!evas_object_visible_get(ec->frame)) continue;
         if (e_comp_wl_subsurface_check(ec)) continue;
index 8c9017b..28e6f35 100644 (file)
@@ -306,7 +306,7 @@ _e_pointer_object_hide(E_Pointer *ptr, Evas_Object *obj)
      {
         ec->hidden = 1;
         ec->visible = EINA_FALSE;
-        ec->visibility.obscured = E_VISIBILITY_FULLY_OBSCURED;
+        e_client_visibility_set(ec, E_VISIBILITY_FULLY_OBSCURED);
         ec->comp_data->mapped = EINA_FALSE;
         ec->override = 1; /* ignore the previous cursor_ec */
      }
@@ -336,7 +336,7 @@ _e_pointer_object_show(E_Pointer *ptr, Evas_Object *obj)
      {
         ec->hidden = 0;
         ec->visible = EINA_TRUE;
-        ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+        e_client_visibility_set(ec, E_VISIBILITY_UNOBSCURED);
         evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h);
         ec->comp_data->mapped = EINA_TRUE;
         ec->override = 0; /* do not ignore the cursor_ec to set the image object */
index aa28b74..d86a89f 100644 (file)
@@ -711,7 +711,7 @@ _e_policy_cb_hook_client_visibility(void *d EINA_UNUSED, E_Client *ec)
 
    if (ec->visibility.changed)
      {
-        if (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+        if (e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED)
           {
              e_policy_client_uniconify_by_visibility(ec);
              if ((ec->iconic == 0) && (ec->exp_iconify.last_sent_iconic != 0))
@@ -744,7 +744,7 @@ _e_policy_cb_hook_client_visibility(void *d EINA_UNUSED, E_Client *ec)
      }
    else
      {
-        if (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
+        if (e_client_visibility_get(ec) == E_VISIBILITY_FULLY_OBSCURED)
           {
              Eina_Bool obscured_by_alpha_opaque = EINA_FALSE;
              Eina_Bool find_above = EINA_FALSE;
index e8a5a7a..11f9e4d 100644 (file)
@@ -190,7 +190,7 @@ _e_policy_check_transient_child_visible(E_Client *ancestor_ec, E_Client *ec)
         if ((child_ec->exp_iconify.skip_iconify == EINA_TRUE) ||
             (child_ec->exp_iconify.skip_by_remote == EINA_TRUE))
           {
-             if (child_ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+             if (e_client_visibility_get(child_ec) == E_VISIBILITY_UNOBSCURED)
                {
                   ELOGF("Find visible child", "ancestor(win:0x%08zx, ec:%p), child(win:0x%08zx, ec:%p)",
                         ec,
@@ -216,13 +216,13 @@ _e_policy_check_transient_child_visible(E_Client *ancestor_ec, E_Client *ec)
           }
         else
           {
-             if ((!child_ec->iconic && (child_ec->visibility.obscured != E_VISIBILITY_UNKNOWN)) ||
-                 (child_ec->visibility.obscured == E_VISIBILITY_UNOBSCURED))
+             if ((!child_ec->iconic && (e_client_visibility_get(child_ec) != E_VISIBILITY_UNKNOWN)) ||
+                 (e_client_visibility_get(child_ec) == E_VISIBILITY_UNOBSCURED))
                {
                   ELOGF("Find visible child", "ancestor(win:0x%08zx, ec:%p), child(win:0x%08zx, ec:%p, iconic:%d, vis:%d)",
                         ec,
                         e_client_util_win_get(ancestor_ec), ancestor_ec,
-                        e_client_util_win_get(child_ec), child_ec, child_ec->iconic, child_ec->visibility.obscured);
+                        e_client_util_win_get(child_ec), child_ec, child_ec->iconic, e_client_visibility_get(child_ec));
                   return EINA_TRUE;
                }
           }
@@ -260,7 +260,7 @@ _e_policy_check_above_alpha_opaque(E_Client *ec)
                continue;
              else
                {
-                  if (above_ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+                  if (e_client_visibility_get(above_ec) == E_VISIBILITY_UNOBSCURED)
                     {
                        alpha_opaque = EINA_TRUE;
                     }
@@ -318,7 +318,7 @@ _e_policy_client_iconify_by_visibility(E_Client *ec)
    /* if client has obscured parent, try to iconify the parent also */
    if (ec->parent)
      {
-        if (ec->parent->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
+        if (e_client_visibility_get(ec->parent) == E_VISIBILITY_FULLY_OBSCURED)
           {
              e_policy_client_iconify_by_visibility(ec->parent);
 
@@ -419,7 +419,7 @@ _e_policy_client_below_uniconify(E_Client *ec)
         if (ec->parent == below_ec) break;
         if (!below_ec->iconic) break;
 
-        if (below_ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
+        if (e_client_visibility_get(below_ec) == E_VISIBILITY_FULLY_OBSCURED)
           {
              e_policy_client_uniconify_by_visibility(below_ec);
           }
@@ -454,7 +454,7 @@ _e_policy_client_uniconify_by_visibility(E_Client *ec)
 EINTERN void
 e_policy_client_visibility_send(E_Client *ec)
 {
-   e_policy_wl_visibility_send(ec, ec->visibility.obscured);
+   e_policy_wl_visibility_send(ec, e_client_visibility_get(ec));
 }
 
 EINTERN void
@@ -1765,7 +1765,7 @@ _e_vis_ec_above_visible_type(E_Client *ec, Eina_Bool check_child)
         e_client_geometry_get(above, &ax, &ay, &aw, &ah);
         if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue;
 
-        if (above->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+        if (e_client_visibility_get(above) == E_VISIBILITY_UNOBSCURED)
           {
              if (!above->argb)
                above_vis_type = E_POL_VIS_TYPE_NON_ALPHA;
@@ -1802,7 +1802,7 @@ _e_vis_client_check_obscure_below(E_Client *ec)
    if (ec->bg_state) return EINA_FALSE;
    if (ec->comp_data && !ec->comp_data->mapped) return EINA_FALSE;
    if ((ec->argb) && (ec->visibility.opaque <= 0)) return EINA_FALSE;
-   if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) return EINA_FALSE;
+   if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED) return EINA_FALSE;
    if (!ec->visible) return EINA_FALSE;
 
    return EINA_TRUE;
@@ -2141,7 +2141,7 @@ _e_vis_intercept_show(void *data EINA_UNUSED, E_Client *ec)
                   if (topmost->pixmap && e_pixmap_usable_get(topmost->pixmap))
                     {
                        if ((e_policy_visibility_client_is_uniconic(topmost)) &&
-                           (topmost->visibility.obscured == E_VISIBILITY_UNOBSCURED))
+                           (e_client_visibility_get(topmost) == E_VISIBILITY_UNOBSCURED))
                          {
                             ELOGF("COMP", "Already child(win:0x%08zx ec:%p) uniconify_render done..", ec, e_client_util_win_get(topmost), topmost);
                             return EINA_TRUE;
index bf686af..9b5e8ee 100644 (file)
@@ -1161,7 +1161,7 @@ _tzpol_iface_cb_vis_get(struct wl_client *client, struct wl_resource *res_tzpol,
 
    if (eina_list_data_find(polwl->pending_vis, ec))
      {
-        e_policy_wl_visibility_send(ec, ec->visibility.obscured);
+        e_policy_wl_visibility_send(ec, e_client_visibility_get(ec));
      }
 }
 
@@ -3362,7 +3362,7 @@ e_policy_wl_win_brightness_apply(E_Client *ec)
    if (e_object_is_del(E_OBJECT(ec)))
      ec_visibility = E_VISIBILITY_FULLY_OBSCURED;
    else
-     ec_visibility = ec->visibility.obscured;
+     ec_visibility = e_client_visibility_get(ec);
 
    EINA_LIST_FOREACH(polwl->tz_dpy_pols, l, tz_dpy_pol)
      {
@@ -5190,8 +5190,8 @@ _e_tzsh_indicator_find_topvisible_client(E_Zone *zone)
 
         if (!ec->visible) continue;
         if (ec->visibility.skip) continue;
-        if ((ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) &&
-            (ec->visibility.obscured != E_VISIBILITY_PARTIALLY_OBSCURED) &&
+        if ((e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED) &&
+            (e_client_visibility_get(ec) != E_VISIBILITY_PARTIALLY_OBSCURED) &&
             (!eina_list_data_find(e_comp->launchscrns, ec)))
           continue;
 
index de27e30..f8ff5d3 100644 (file)
@@ -1,5 +1,6 @@
 #include "e_policy_wl_display_intern.h"
 #include "e_dbus_conn_intern.h"
+#include "e_client_intern.h"
 
 typedef struct _E_Display_Dbus_Info
 {
@@ -188,7 +189,7 @@ _e_policy_wl_display_screen_mode_find_visible_window(void)
         if (e_object_is_del(E_OBJECT(ec)))
           ec_visibility = E_VISIBILITY_FULLY_OBSCURED;
         else
-          ec_visibility = ec->visibility.obscured;
+          ec_visibility = e_client_visibility_get(ec);
 
         if ((ec_visibility == E_VISIBILITY_UNOBSCURED) ||
             (ec_visibility == E_VISIBILITY_PARTIALLY_OBSCURED))
index eaf1dbb..c0dfe0f 100644 (file)
@@ -305,9 +305,9 @@ _e_process_cb_client_visibility_change(void *data EINA_UNUSED, int type EINA_UNU
           return ECORE_CALLBACK_PASS_ON;
      }
 
-   if (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+   if (e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED)
      _e_process_thaw(pid);
-   else if (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
+   else if (e_client_visibility_get(ec) == E_VISIBILITY_FULLY_OBSCURED)
      {
         if (_e_process_windows_visible_get(pid, &visible))
           {
@@ -418,7 +418,7 @@ _e_process_cb_hook_visibility(void *d EINA_UNUSED, E_Client *ec)
 {
    if (ec->visibility.changed)
      {
-        if (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+        if (e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED)
           {
              _e_process_thaw(ec->netwm.pid);
           }
@@ -446,7 +446,7 @@ _e_process_cb_intercept_hide(void *data EINA_UNUSED, E_Client *ec)
    pinfo = _e_process_find(_e_process_manager, pid);
    if (!pinfo) goto intercept_hide_done;
 
-   if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
+   if (e_client_visibility_get(ec) != E_VISIBILITY_FULLY_OBSCURED)
      goto intercept_hide_done;
 
    if (pinfo->state == E_PROCESS_STATE_BACKGROUND)
index a0d22ae..2e46a22 100644 (file)
@@ -384,7 +384,7 @@ _e_test_helper_message_append_client(Eldbus_Message_Iter *iter, E_Client *ec)
        ec->visible,
        evas_object_visible_get(ec->frame),
        ec->visibility.opaque,
-       ec->visibility.obscured,
+       e_client_visibility_get(ec),
        ec->visibility.skip,
        ec->iconic ? (e_client_is_iconified_by_client(ec) ? 2 : 1) : 0,
 
@@ -1339,10 +1339,10 @@ _e_test_helper_cb_visibility_change(void *data EINA_UNUSED,
 
    if (reg_win == NULL) return ECORE_CALLBACK_PASS_ON;
 
-   if (reg_win->vis != !ec->visibility.obscured)
-     _e_test_helper_send_change_visibility(win, !ec->visibility.obscured);
+   if (reg_win->vis != !e_client_visibility_get(ec))
+     _e_test_helper_send_change_visibility(win, !e_client_visibility_get(ec));
 
-   reg_win->vis = !ec->visibility.obscured;
+   reg_win->vis = !e_client_visibility_get(ec);
 
    return ECORE_CALLBACK_PASS_ON;
 }
index 5e13294..d9c9cb1 100644 (file)
@@ -2344,7 +2344,7 @@ e_zone_is_displaying(E_Zone *zone)
 #ifdef EC_IS_NOT_VISIBLE
 # undef EC_IS_NOT_VISIBLE
 #endif
-#define EC_IS_NOT_VISIBLE if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
+#define EC_IS_NOT_VISIBLE if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED)
 
 EINTERN Eina_Bool
 e_zone_visibility_calculate(E_Zone *zone)
@@ -2418,7 +2418,7 @@ e_zone_visibility_calculate(E_Zone *zone)
 
         if (!e_zone_is_displaying(zone))
           {
-             if ((ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED) &&
+             if ((e_client_visibility_get(ec) == E_VISIBILITY_FULLY_OBSCURED) &&
                  (ec->visibility.last_sent_type != E_VISIBILITY_FULLY_OBSCURED))
                {
                   ec->visibility.changed = 1;
@@ -2552,7 +2552,7 @@ e_zone_visibility_calculate(E_Zone *zone)
                        ((effect_running) && (!is_launching_effect))))
                     {
                        /* previous state is obscured: -1 or 1 */
-                       ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+                       e_client_visibility_set(ec, E_VISIBILITY_UNOBSCURED);
                        ec->visibility.changed = 1;
                        ELOGF("POL_VIS", "CLIENT VIS ON.  argb:%d, opaque:%2d, frame_v:%d, ignore_geometry:%d, cdata:%p, geo(%d,%d,%dx%d), asp:%d, er:%d, le:%d", ec, ec->argb, ec->visibility.opaque, ec_frame_visible, ec->visibility.ignore_geometry, cdata, x, y, w, h, is_above_show_pending, effect_running, is_launching_effect);
                     }
@@ -2600,10 +2600,10 @@ e_zone_visibility_calculate(E_Zone *zone)
                  (iconified_by_client))
                {
                   /* obscured case */
-                  if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
+                  if (e_client_visibility_get(ec) != E_VISIBILITY_FULLY_OBSCURED)
                     {
                        /* previous state is unobscured: -1 or 0 */
-                       ec->visibility.obscured = E_VISIBILITY_FULLY_OBSCURED;
+                       e_client_visibility_set(ec, E_VISIBILITY_FULLY_OBSCURED);
                        ec->visibility.changed = 1;
                        ELOGF("POL_VIS", "CLIENT VIS OFF. argb:%d, opaque:%2d, frame_v:%d, canvas_v:%d, calc_r:%d(%d), ignore_geometry:%d, show_p:%d, geo(%d,%d,%dx%d)",
                              ec, ec->argb, ec->visibility.opaque,
@@ -2634,7 +2634,7 @@ e_zone_visibility_calculate(E_Zone *zone)
              if (ec == touched_ec)
                touched_win_changed = EINA_TRUE;
 
-             if (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+             if (e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED)
                {
                   if (e_comp_wl->touch.pressed && !touched_win_changed && !e_policy_client_is_keyboard_sub(ec))
                     {
index 914049a..cfb2126 100644 (file)
@@ -1051,7 +1051,7 @@ _launcher_cb_launch(struct wl_client *client EINA_UNUSED,
          "Recieved request(launcher_launch) appid:%s instance id:%s pid:%d",
          lc->ec, app_id?:"NONE", instance_id?:"NONE", pid);
 
-   EINA_SAFETY_ON_TRUE_GOTO(lc->ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED, send_stop);
+   EINA_SAFETY_ON_TRUE_GOTO(e_client_visibility_get(lc->ec) == E_VISIBILITY_FULLY_OBSCURED, send_stop);
    EINA_SAFETY_ON_TRUE_GOTO((pid < 0) && !(app_id) , send_stop);
 
    //check current state of lc
@@ -1137,7 +1137,7 @@ _launcher_cb_launch_with_shared_widget(struct wl_client *client EINA_UNUSED,
          "Recieved request(launcher_launch_with_shared_widget) appid:%s instance id:%s pid:%d",
          lc->ec, app_id?:"NONE", instance_id?:"NONE", pid);
 
-   EINA_SAFETY_ON_TRUE_GOTO(lc->ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED, send_stop);
+   EINA_SAFETY_ON_TRUE_GOTO(e_client_visibility_get(lc->ec) == E_VISIBILITY_FULLY_OBSCURED, send_stop);
    EINA_SAFETY_ON_TRUE_GOTO((pid < 0) && !(app_id), send_stop);
 
    // check current state of lc
@@ -1677,7 +1677,7 @@ _launcher_handler_cb_hook_vis_lower(void *data EINA_UNUSED, E_Client *ec)
      }
    if (!lc) return EINA_FALSE;
 
-   if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) return EINA_FALSE;
+   if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED) return EINA_FALSE;
 
    if (ec == lc->launched_ec)
      {
@@ -1769,7 +1769,7 @@ _launcher_handler_cb_hook_vis_hide(void *data EINA_UNUSED, E_Client *ec)
      }
    if (!lc) return EINA_FALSE;
 
-   if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) return EINA_FALSE;
+   if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED) return EINA_FALSE;
 
    if (ec == lc->launched_ec)
      {
@@ -2016,7 +2016,7 @@ _launcher_handler_cb_event_client_visibility_change(void *data, int type EINA_UN
    EINA_SAFETY_ON_NULL_RETURN_VAL(ev->ec, ECORE_CALLBACK_PASS_ON);
 
    ec = ev->ec;
-   if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
+   if (e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED)
      return ECORE_CALLBACK_PASS_ON;
 
    pre_runner = _launcher_handler_launcher_pre_runner_get();
index fabde77..4d9b08b 100644 (file)
@@ -9,6 +9,7 @@
 #include "iface/e_video_fallback_intern.h"
 #include "e_comp_wl_rsm_intern.h"
 #include "e_eom_intern.h"
+#include "e_client_intern.h"
 
 #define EO_DATA_KEY  "E_Client_Video"
 
@@ -237,7 +238,7 @@ _e_client_video_visibility_event_send(E_Client_Video *ecv)
    int obscured;
 
    ec = ecv->ec;
-   obscured = ec->visibility.obscured;
+   obscured = e_client_visibility_get(ec);
    VIN("Signal visibility change event of video, type %d",
        ec, obscured);
 
@@ -256,10 +257,10 @@ _e_client_video_visibility_set(E_Client_Video *ecv, E_Visibility vis)
    E_Client *ec;
 
    ec = ecv->ec;
-   if (ec->visibility.obscured == vis)
+   if (e_client_visibility_get(ec) == vis)
      return;
 
-   ec->visibility.obscured = vis;
+   e_client_visibility_set(ec, vis);
    _e_client_video_visibility_event_send(ecv);
 }
 
@@ -282,7 +283,7 @@ _e_client_video_cb_ec_visibility_change(void *data, int type EINA_UNUSED, void *
    if (ev->ec != topmost)
      goto end;
 
-   _e_client_video_visibility_set(ecv, topmost->visibility.obscured);
+   _e_client_video_visibility_set(ecv, e_client_visibility_get(topmost));
 
 end:
    return ECORE_CALLBACK_PASS_ON;
@@ -328,7 +329,7 @@ _e_client_video_cb_remote_surface_provider_visibility_change(void *data, int typ
    if (ev->ec != offscreen_parent)
      goto end;
 
-   switch (ev->ec->visibility.obscured)
+   switch (e_client_visibility_get(ev->ec))
      {
       case E_VISIBILITY_FULLY_OBSCURED:
          evas_object_hide(ecv->ec->frame);
@@ -365,7 +366,7 @@ _e_client_video_cb_hook_subsurface_create(void *data, E_Client *ec)
    if (topmost1 && topmost2)
      {
         if (topmost1 == topmost2)
-          _e_client_video_visibility_set(ecv, topmost1->visibility.obscured);
+          _e_client_video_visibility_set(ecv, e_client_visibility_get(topmost1));
      }
 }
 
index 8e18882..dfd6b13 100644 (file)
@@ -5,6 +5,7 @@
 #include "e_zone_video_intern.h"
 #include "e_comp_wl_viewport_intern.h"
 #include "e_utils_intern.h"
+#include "e_client_intern.h"
 
 #include <tizen-extension-server-protocol.h>
 
@@ -215,7 +216,7 @@ _e_comp_wl_video_object_ec_cb_visibility_change(void *data, int type, void *even
      return ECORE_CALLBACK_PASS_ON;
 
    ec = ev->ec;
-   switch (ec->visibility.obscured)
+   switch (e_client_visibility_get(ec))
      {
       case E_VISIBILITY_FULLY_OBSCURED:
          evas_object_hide(ec->frame);
index 8b3fefa..e4b6bb1 100644 (file)
@@ -9,6 +9,7 @@
 #include "e_comp_wl_video_buffer_intern.h"
 #include "e_util_video_intern.h"
 #include "e_video_debug_intern.h"
+#include "e_client_intern.h"
 
 #include <wayland-tbm-server.h>
 
@@ -69,7 +70,7 @@ _e_video_hwc_client_visible_get(E_Client *ec)
      return EINA_TRUE;
 
    offscreen_parent = _e_video_hwc_client_offscreen_parent_get(ec);
-   if (offscreen_parent && offscreen_parent->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
+   if (offscreen_parent && e_client_visibility_get(offscreen_parent) == E_VISIBILITY_FULLY_OBSCURED)
      {
         VDB("video surface invisible: offscreen fully obscured", ec);
         return EINA_FALSE;