forked from enlightenment/enlightenment
Tracking a strange segfault with shelf removal; add a little extra trapping
for a shape change. Remove whitespace & fix some formatting. SVN revision: 34540
This commit is contained in:
parent
09453fe184
commit
8e1632a54c
|
@ -86,9 +86,8 @@ e_container_new(E_Manager *man)
|
|||
ecore_x_window_raise(con->win);
|
||||
}
|
||||
else
|
||||
{
|
||||
con->win = con->manager->win;
|
||||
}
|
||||
|
||||
con->bg_ecore_evas = e_canvas_new(e_config->evas_engine_container, con->win,
|
||||
0, 0, con->w, con->h, 1, 1,
|
||||
&(con->bg_win), NULL);
|
||||
|
@ -170,9 +169,7 @@ e_container_new(E_Manager *man)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
zone = e_zone_new(con, 0, 0, 0, 0, con->w, con->h);
|
||||
}
|
||||
return con;
|
||||
}
|
||||
|
||||
|
@ -181,6 +178,7 @@ e_container_show(E_Container *con)
|
|||
{
|
||||
E_OBJECT_CHECK(con);
|
||||
E_OBJECT_TYPE_CHECK(con, E_CONTAINER_TYPE);
|
||||
|
||||
if (con->visible) return;
|
||||
ecore_evas_show(con->bg_ecore_evas);
|
||||
ecore_x_window_configure(con->bg_win,
|
||||
|
@ -199,6 +197,7 @@ e_container_hide(E_Container *con)
|
|||
{
|
||||
E_OBJECT_CHECK(con);
|
||||
E_OBJECT_TYPE_CHECK(con, E_CONTAINER_TYPE);
|
||||
|
||||
if (!con->visible) return;
|
||||
ecore_evas_hide(con->bg_ecore_evas);
|
||||
if (con->win != con->manager->win)
|
||||
|
@ -215,13 +214,14 @@ e_container_current_get(E_Manager *man)
|
|||
|
||||
for (l = man->containers; l; l = l->next)
|
||||
{
|
||||
E_Container *con = l->data;
|
||||
if (con->visible)
|
||||
return con;
|
||||
E_Container *con;
|
||||
|
||||
if (!(con = l->data)) continue;
|
||||
if (con->visible) return con;
|
||||
}
|
||||
|
||||
/* If noone is available, return the first */
|
||||
if (!man->containers)
|
||||
return NULL;
|
||||
if (!man->containers) return NULL;
|
||||
l = man->containers;
|
||||
return (E_Container *)l->data;
|
||||
}
|
||||
|
@ -238,8 +238,7 @@ e_container_number_get(E_Manager *man, int num)
|
|||
E_Container *con;
|
||||
|
||||
con = l->data;
|
||||
if (con->num == num)
|
||||
return con;
|
||||
if (con->num == num) return con;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -307,7 +306,7 @@ e_container_lower(E_Container *con)
|
|||
EAPI E_Zone *
|
||||
e_container_zone_at_point_get(E_Container *con, int x, int y)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
E_OBJECT_CHECK_RETURN(con, NULL);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, NULL);
|
||||
|
@ -325,7 +324,7 @@ e_container_zone_at_point_get(E_Container *con, int x, int y)
|
|||
EAPI E_Zone *
|
||||
e_container_zone_number_get(E_Container *con, int num)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
E_OBJECT_CHECK_RETURN(con, NULL);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, NULL);
|
||||
|
@ -334,8 +333,7 @@ e_container_zone_number_get(E_Container *con, int num)
|
|||
E_Zone *zone;
|
||||
|
||||
zone = l->data;
|
||||
if (zone->num == num)
|
||||
return zone;
|
||||
if (zone->num == num) return zone;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -343,7 +341,7 @@ e_container_zone_number_get(E_Container *con, int num)
|
|||
EAPI E_Zone *
|
||||
e_container_zone_id_get(E_Container *con, int id)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
E_OBJECT_CHECK_RETURN(con, NULL);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, NULL);
|
||||
|
@ -352,8 +350,7 @@ e_container_zone_id_get(E_Container *con, int id)
|
|||
E_Zone *zone;
|
||||
|
||||
zone = l->data;
|
||||
if (zone->id == id)
|
||||
return zone;
|
||||
if (zone->id == id) return zone;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -462,7 +459,7 @@ e_container_shape_change_callback_add(E_Container *con, void (*func) (void *data
|
|||
EAPI void
|
||||
e_container_shape_change_callback_del(E_Container *con, void (*func) (void *data, E_Container_Shape *es, E_Container_Shape_Change ch), void *data)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
/* FIXME: if we call this from within a callback we are in trouble */
|
||||
E_OBJECT_CHECK(con);
|
||||
|
@ -492,7 +489,7 @@ e_container_shape_rects_get(E_Container_Shape *es)
|
|||
EAPI void
|
||||
e_container_shape_rects_set(E_Container_Shape *es, Ecore_X_Rectangle *rects, int num)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
int i;
|
||||
E_Rect *r;
|
||||
|
||||
|
@ -814,9 +811,9 @@ e_container_border_stack_below(E_Border *bd, E_Border *below)
|
|||
EAPI E_Border_List *
|
||||
e_container_border_list_first(E_Container *con)
|
||||
{
|
||||
E_Border_List *list;
|
||||
list = E_NEW(E_Border_List, 1);
|
||||
if (!list) return NULL;
|
||||
E_Border_List *list = NULL;
|
||||
|
||||
if (!(list = E_NEW(E_Border_List, 1))) return NULL;
|
||||
list->container = con;
|
||||
e_object_ref(E_OBJECT(con));
|
||||
list->layer = 0;
|
||||
|
@ -829,9 +826,9 @@ e_container_border_list_first(E_Container *con)
|
|||
EAPI E_Border_List *
|
||||
e_container_border_list_last(E_Container *con)
|
||||
{
|
||||
E_Border_List *list;
|
||||
list = E_NEW(E_Border_List, 1);
|
||||
if (!list) return NULL;
|
||||
E_Border_List *list = NULL;
|
||||
|
||||
if (!(list = E_NEW(E_Border_List, 1))) return NULL;
|
||||
list->container = con;
|
||||
e_object_ref(E_OBJECT(con));
|
||||
list->layer = 6;
|
||||
|
@ -1156,7 +1153,7 @@ _e_container_shape_del(E_Container_Shape *es)
|
|||
static void
|
||||
_e_container_shape_free(E_Container_Shape *es)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
es->con->shapes = evas_list_remove(es->con->shapes, es);
|
||||
for (l = es->shape; l; l = l->next)
|
||||
|
@ -1168,13 +1165,14 @@ _e_container_shape_free(E_Container_Shape *es)
|
|||
static void
|
||||
_e_container_shape_change_call(E_Container_Shape *es, E_Container_Shape_Change ch)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *l = NULL;
|
||||
|
||||
if ((!es) || (!es->con) || (!es->con->shape_change_cb)) return;
|
||||
for (l = es->con->shape_change_cb; l; l = l->next)
|
||||
{
|
||||
E_Container_Shape_Callback *cb;
|
||||
|
||||
cb = l->data;
|
||||
if (!(cb = l->data)) continue;
|
||||
cb->func(cb->data, es, ch);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue