E_HWC_WINDOW_RESTRICTION_CONTENT_IMAGE,
E_HWC_WINDOW_RESTRICTION_QUICKPANEL_OPEN,
E_HWC_WINDOW_RESTRICTION_PIXMAP_RESOURCE,
+ E_HWC_WINDOW_RESTRICTION_OBSCURED_BY_TARGET,
} E_Hwc_Window_Restriction;
static Eina_Bool ehw_trace = EINA_FALSE;
goto finish;
}
+ if (hwc_window->obscured_by_target)
+ {
+ restriction = E_HWC_WINDOW_RESTRICTION_OBSCURED_BY_TARGET;
+ available = EINA_FALSE;
+ goto finish;
+ }
+
if (e_comp_object_is_animating(ec->frame))
{
restriction = E_HWC_WINDOW_RESTRICTION_ANIMATING;
return "quickpanel open";
case E_HWC_WINDOW_RESTRICTION_PIXMAP_RESOURCE:
return "pixmap resource";
+ case E_HWC_WINDOW_RESTRICTION_OBSCURED_BY_TARGET:
+ return "obscured by target";
default:
return "UNKNOWN";
}
E_Hwc_Window *hwc_window;
E_Client *ec;
Evas_Object *o;
- int scr_w, scr_h;
+ int ee_w, ee_h;
int x, y, w, h;
+ int r, g, b, a;
int ui_skip = EINA_FALSE;
+ int obscured_by_target = EINA_FALSE;
+ const char *type = NULL;
+
+ ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &ee_w, &ee_h);
for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
{
ec = _e_hwc_windows_client_get_from_object(o);
+ if (!ec)
+ {
+ if (obscured_by_target) continue;
- if (!ec) continue;
- if (!ec->hwc_window) continue;
+ type = evas_object_type_get(o);
+ if (!e_util_strcmp(type, "image"))
+ {
+ evas_object_color_get(o, &r, &g, &b, &a);
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+
+ if ((a > 0) && ((r > 0) || (g > 0) || (b > 0)) &&
+ (E_INTERSECTS(0, 0, ee_w, ee_h, x, y, w, h)))
+ obscured_by_target = EINA_TRUE;
+ }
+
+ continue;
+ }
hwc_window = ec->hwc_window;
+ if (!hwc_window) continue;
e_hwc_window_name_set(hwc_window);
+ hwc_window->obscured_by_target = obscured_by_target;
// check clients to skip composite
if (e_client_util_ignored_get(ec))
// check geometry if located out of screen such as quick panel
e_client_geometry_get(ec, &x, &y, &w, &h);
- ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &scr_w, &scr_h);
- if (!E_INTERSECTS(0, 0, scr_w, scr_h, x, y, w, h))
+ if (!E_INTERSECTS(0, 0, ee_w, ee_h, x, y, w, h))
{
e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE, EINA_TRUE);
continue;
windows_list = eina_list_append(windows_list, hwc_window);
if ((!ec->argb) &&
- (E_CONTAINS(x, y, w, h, 0, 0, scr_w, scr_h)) &&
+ (E_CONTAINS(x, y, w, h, 0, 0, ee_w, ee_h)) &&
(!e_comp_object_is_animating(ec->frame)))
ui_skip = EINA_TRUE;
}