}
static E_Client *
-_e_client_input_rect_under_pointer_helper(E_Desk *desk, E_Client *exclude, int x, int y)
-{
- E_Client *ec = NULL, *cec;
- int cx, cy, cw, ch;
-
- E_CLIENT_REVERSE_FOREACH(cec)
- {
- /* If a border was specified which should be excluded from the list
- * (because it will be closed shortly for example), skip */
- if (e_client_util_ignored_get(cec) || (!e_desk_has_ec(desk, cec))) continue;
- if (!evas_object_visible_get(cec->frame)) continue;
- if (e_policy_client_is_cursor(cec)) continue;
- if ((exclude) && (cec == exclude)) continue;
- e_client_geometry_get(cec, &cx, &cy, &cw, &ch);
- if (!E_INSIDE(x, y, cx, cy, cw, ch))
- continue;
- /* If the layer is higher, the position of the window is higher
- * (always on top vs always below) */
- if (ec && (cec->layer <= ec->layer)) continue;
- if (_e_client_position_inside_input_rect(cec, x, y))
- ec = cec;
- }
-
- return ec;
-}
-
-static E_Client *
_e_client_under_pointer_input_helper(E_Desk *desk, int x, int y)
{
E_Client *ec = NULL, *cec;
return _e_client_under_pointer_input_helper(desk, x, y);
}
-EINTERN E_Client *
-e_client_input_rect_under_pointer_get(E_Desk *desk, E_Client *exclude)
-{
- int x, y;
-
- /* We need to ensure that we can get the comp window for the
- * zone of either the given desk or the desk of the excluded
- * window, so return if neither is given */
- if (desk)
- e_input_device_pointer_xy_get(NULL, &x, &y);
- else if (exclude)
- e_input_device_pointer_xy_get(NULL, &x, &y);
- else
- return NULL;
-
- if (!desk)
- {
- desk = exclude->desk;
- if (!desk)
- {
- if (exclude->zone)
- desk = e_desk_current_get(exclude->zone);
- else
- desk = e_desk_current_get(e_zone_current_get());
- }
- }
-
- return desk ? _e_client_input_rect_under_pointer_helper(desk, exclude, x, y) : NULL;
-}
-
////////////////////////////////////////////
////////////////////////////////////////////
EINTERN void e_client_resize_limit(E_Client *ec, int *w, int *h);
EINTERN E_Client *e_client_under_pointer_get(E_Desk *desk, E_Client *exclude);
E_API E_Client *e_client_under_position_get(E_Desk *desk, int x, int y, E_Client *exclude);
-EINTERN E_Client *e_client_input_rect_under_pointer_get(E_Desk *desk, E_Client *exclude);
E_API E_Client *e_client_under_position_input_get(E_Desk *desk, int x, int y);
E_API void e_client_redirected_set(E_Client *ec, Eina_Bool set);
EINTERN Eina_Bool e_client_is_stacking(const E_Client *ec);