forked from enlightenment/enlightenment
remove some e_comp_get() usage in core comp/client files
This commit is contained in:
parent
f4d376be2f
commit
0bac875290
|
@ -385,7 +385,7 @@ static void
|
|||
_e_client_action_finish(void)
|
||||
{
|
||||
if (comp_grabbed)
|
||||
_e_client_action_input_win_del(action_client ? action_client->comp : e_comp_get(NULL));
|
||||
_e_client_action_input_win_del(e_comp);
|
||||
|
||||
E_FREE_FUNC(action_timer, ecore_timer_del);
|
||||
E_FREE_FUNC(action_handler_key, ecore_event_handler_del);
|
||||
|
@ -3961,8 +3961,8 @@ e_client_urgent_set(E_Client *ec, Eina_Bool urgent)
|
|||
if (urgent && e_screensaver_on_get() && e_config->screensaver_wake_on_urgent)
|
||||
{
|
||||
int x, y;
|
||||
ecore_evas_pointer_xy_get(e_comp_get(NULL)->ee, &x, &y);
|
||||
ecore_evas_pointer_warp(e_comp_get(NULL)->ee, x, y);
|
||||
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
|
||||
ecore_evas_pointer_warp(e_comp->ee, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4687,9 +4687,9 @@ e_client_under_pointer_get(E_Desk *desk, E_Client *exclude)
|
|||
* zone of either the given desk or the desk of the excluded
|
||||
* window, so return if neither is given */
|
||||
if (desk)
|
||||
ecore_evas_pointer_xy_get(e_comp_get(desk)->ee, &x, &y);
|
||||
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
|
||||
else if (exclude)
|
||||
ecore_evas_pointer_xy_get(exclude->comp->ee, &x, &y);
|
||||
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
|
||||
else
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -1387,12 +1387,11 @@ e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
e_comp_util_wins_print(const E_Comp *c)
|
||||
e_comp_util_wins_print(const E_Comp *c EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
if (!c) c = e_comp_get(NULL);
|
||||
o = evas_object_top_get(c->evas);
|
||||
o = evas_object_top_get(e_comp->evas);
|
||||
while (o)
|
||||
{
|
||||
E_Client *ec;
|
||||
|
|
|
@ -73,24 +73,24 @@ _e_comp_canvas_cb_mouse_in(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obje
|
|||
}
|
||||
|
||||
static void
|
||||
_e_comp_canvas_cb_mouse_down(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
_e_comp_canvas_cb_mouse_down(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
if (e_client_action_get()) return;
|
||||
e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(c), event_info);
|
||||
e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_canvas_cb_mouse_up(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
_e_comp_canvas_cb_mouse_up(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
if (e_client_action_get()) return;
|
||||
e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(c), event_info);
|
||||
e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_canvas_cb_mouse_wheel(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
_e_comp_canvas_cb_mouse_wheel(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
if (e_client_action_get()) return;
|
||||
e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(c), event_info);
|
||||
e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
|
@ -105,14 +105,12 @@ _e_comp_cb_zone_change()
|
|||
////////////////////////////////////
|
||||
|
||||
static void
|
||||
_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
|
||||
_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
|
||||
{
|
||||
E_Comp *c;
|
||||
/* thawed in _e_comp_screensaver_off() */
|
||||
ecore_animator_frametime_set(10.0);
|
||||
c = e_comp_util_evas_object_comp_get(obj);
|
||||
if (!c->nocomp)
|
||||
ecore_evas_manual_render_set(c->ee, EINA_TRUE);
|
||||
if (!e_comp->nocomp)
|
||||
ecore_evas_manual_render_set(e_comp->ee, EINA_TRUE);
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
|
@ -216,26 +214,23 @@ e_comp_all_thaw(void)
|
|||
}
|
||||
|
||||
EAPI E_Zone *
|
||||
e_comp_zone_xy_get(const E_Comp *c, Evas_Coord x, Evas_Coord y)
|
||||
e_comp_zone_xy_get(const E_Comp *c EINA_UNUSED, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
const Eina_List *l;
|
||||
E_Zone *zone;
|
||||
|
||||
if (!c) c = e_comp_get(NULL);
|
||||
EINA_LIST_FOREACH(c->zones, l, zone)
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
if (E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h)) return zone;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI E_Zone *
|
||||
e_comp_zone_number_get(E_Comp *c, int num)
|
||||
e_comp_zone_number_get(E_Comp *c EINA_UNUSED, int num)
|
||||
{
|
||||
Eina_List *l = NULL;
|
||||
E_Zone *zone = NULL;
|
||||
|
||||
E_OBJECT_CHECK_RETURN(c, NULL);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(c, E_COMP_TYPE, NULL);
|
||||
EINA_LIST_FOREACH(c->zones, l, zone)
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
if ((int)zone->num == num) return zone;
|
||||
}
|
||||
|
@ -243,14 +238,12 @@ e_comp_zone_number_get(E_Comp *c, int num)
|
|||
}
|
||||
|
||||
EAPI E_Zone *
|
||||
e_comp_zone_id_get(E_Comp *c, int id)
|
||||
e_comp_zone_id_get(E_Comp *c EINA_UNUSED, int id)
|
||||
{
|
||||
Eina_List *l = NULL;
|
||||
E_Zone *zone = NULL;
|
||||
|
||||
E_OBJECT_CHECK_RETURN(c, NULL);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(c, E_COMP_TYPE, NULL);
|
||||
EINA_LIST_FOREACH(c->zones, l, zone)
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
if (zone->id == id) return zone;
|
||||
}
|
||||
|
@ -258,17 +251,15 @@ e_comp_zone_id_get(E_Comp *c, int id)
|
|||
}
|
||||
|
||||
EAPI E_Desk *
|
||||
e_comp_desk_window_profile_get(E_Comp *c, const char *profile)
|
||||
e_comp_desk_window_profile_get(E_Comp *c EINA_UNUSED, const char *profile)
|
||||
{
|
||||
Eina_List *l = NULL;
|
||||
E_Zone *zone = NULL;
|
||||
int x, y;
|
||||
|
||||
E_OBJECT_CHECK_RETURN(c, NULL);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(c, E_COMP_TYPE, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(profile, NULL);
|
||||
|
||||
EINA_LIST_FOREACH(c->zones, l, zone)
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
for (x = 0; x < zone->desk_x_count; x++)
|
||||
{
|
||||
|
|
|
@ -394,7 +394,7 @@ e_hints_active_window_set(E_Manager *man,
|
|||
#ifdef HAVE_WAYLAND_ONLY
|
||||
#else
|
||||
E_OBJECT_CHECK(man);
|
||||
if (e_comp_get(man)->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
if (ec && (e_pixmap_type_get(ec->pixmap) == E_PIXMAP_TYPE_X))
|
||||
ecore_x_netwm_client_active_set(man->root, e_client_util_win_get(ec));
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue