forked from enlightenment/enlightenment
Looping borders are now done in correct stacking order.
SVN revision: 14751
This commit is contained in:
parent
61baf25921
commit
739b5abd87
|
@ -106,9 +106,6 @@ static void _e_border_move_begin(E_Border *bd);
|
|||
static void _e_border_move_end(E_Border *bd);
|
||||
static void _e_border_move_update(E_Border *bd);
|
||||
|
||||
static void _e_border_reorder_after(E_Border *bd, E_Border *after);
|
||||
static void _e_border_reorder_before(E_Border *bd, E_Border *before);
|
||||
|
||||
static int _e_border_cb_focus_fix(void *data);
|
||||
|
||||
/* local subsystem globals */
|
||||
|
@ -336,7 +333,7 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
|
|||
|
||||
bd->zone = e_zone_current_get(con);
|
||||
bd->desk = e_desk_current_get(bd->zone);
|
||||
con->clients = evas_list_append(con->clients, bd);
|
||||
e_container_border_add(bd);
|
||||
borders = evas_list_append(borders, bd);
|
||||
|
||||
managed = 1;
|
||||
|
@ -592,8 +589,9 @@ e_border_raise(E_Border *bd)
|
|||
{
|
||||
E_OBJECT_CHECK(bd);
|
||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||
_e_border_reorder_after(bd, NULL);
|
||||
|
||||
e_container_border_raise(bd);
|
||||
|
||||
{
|
||||
E_Event_Border_Raise *ev;
|
||||
|
||||
|
@ -610,8 +608,9 @@ e_border_lower(E_Border *bd)
|
|||
{
|
||||
E_OBJECT_CHECK(bd);
|
||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||
_e_border_reorder_before(bd, NULL);
|
||||
|
||||
e_container_border_lower(bd);
|
||||
|
||||
{
|
||||
E_Event_Border_Lower *ev;
|
||||
|
||||
|
@ -628,12 +627,9 @@ e_border_stack_above(E_Border *bd, E_Border *above)
|
|||
{
|
||||
E_OBJECT_CHECK(bd);
|
||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||
_e_border_reorder_after(bd, above);
|
||||
ecore_x_window_configure(bd->win,
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||
0, 0, 0, 0, 0,
|
||||
above->win, ECORE_X_WINDOW_STACK_ABOVE);
|
||||
|
||||
e_container_border_stack_above(bd, above);
|
||||
|
||||
{
|
||||
E_Event_Border_Raise *ev;
|
||||
|
||||
|
@ -651,12 +647,8 @@ e_border_stack_below(E_Border *bd, E_Border *below)
|
|||
{
|
||||
E_OBJECT_CHECK(bd);
|
||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||
_e_border_reorder_before(bd, below);
|
||||
ecore_x_window_configure(bd->win,
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||
0, 0, 0, 0, 0,
|
||||
below->win, ECORE_X_WINDOW_STACK_BELOW);
|
||||
|
||||
e_container_border_stack_below(bd, below);
|
||||
{
|
||||
E_Event_Border_Lower *ev;
|
||||
|
||||
|
@ -1173,7 +1165,7 @@ e_border_focused_get(void)
|
|||
void
|
||||
e_border_idler_before(void)
|
||||
{
|
||||
Evas_List *l;
|
||||
Evas_List *ml, *cl;
|
||||
|
||||
if (!borders)
|
||||
return;
|
||||
|
@ -1182,11 +1174,21 @@ e_border_idler_before(void)
|
|||
* 1. show windows
|
||||
* 2. hide windows and evaluate rest
|
||||
*/
|
||||
for (l = borders->last; l; l = l->prev)
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
||||
man = ml->data;
|
||||
for (cl = man->containers; cl; cl = cl->next)
|
||||
{
|
||||
E_Container *con;
|
||||
E_Border_List *bl;
|
||||
E_Border *bd;
|
||||
|
||||
bd = l->data;
|
||||
con = cl->data;
|
||||
bl = e_container_border_list_last(con);
|
||||
while ((bd = e_container_border_list_prev(bl)))
|
||||
{
|
||||
if ((bd->changes.visible) && (bd->visible))
|
||||
{
|
||||
ecore_evas_show(bd->bg_ecore_evas);
|
||||
|
@ -1194,12 +1196,24 @@ e_border_idler_before(void)
|
|||
bd->changes.visible = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (l = borders; l; l = l->next)
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
||||
man = ml->data;
|
||||
for (cl = man->containers; cl; cl = cl->next)
|
||||
{
|
||||
E_Container *con;
|
||||
E_Border_List *bl;
|
||||
E_Border *bd;
|
||||
|
||||
bd = l->data;
|
||||
con = cl->data;
|
||||
bl = e_container_border_list_first(con);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
if ((bd->changes.visible) && (!bd->visible))
|
||||
{
|
||||
ecore_x_window_hide(bd->win);
|
||||
|
@ -1209,10 +1223,13 @@ e_border_idler_before(void)
|
|||
if (bd->changed) _e_border_eval(bd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Evas_List *
|
||||
e_border_clients_get()
|
||||
{
|
||||
/* FIXME: This should be a somewhat ordered list */
|
||||
return borders;
|
||||
}
|
||||
|
||||
|
@ -1420,7 +1437,7 @@ _e_border_free(E_Border *bd)
|
|||
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win);
|
||||
ecore_x_window_del(bd->win);
|
||||
|
||||
bd->zone->container->clients = evas_list_remove(bd->zone->container->clients, bd);
|
||||
e_container_border_remove(bd);
|
||||
borders = evas_list_remove(borders, bd);
|
||||
|
||||
free(bd);
|
||||
|
@ -4167,44 +4184,6 @@ _e_border_move_update(E_Border *bd)
|
|||
e_move_update(bd->x, bd->y);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_border_reorder_after(E_Border *bd, E_Border *after)
|
||||
{
|
||||
if (after)
|
||||
{
|
||||
bd->zone->container->clients = evas_list_remove(bd->zone->container->clients, bd);
|
||||
bd->zone->container->clients = evas_list_append_relative(bd->zone->container->clients, bd, after);
|
||||
borders = evas_list_remove(borders, bd);
|
||||
borders = evas_list_append_relative(borders, bd, after);
|
||||
}
|
||||
else
|
||||
{
|
||||
bd->zone->container->clients = evas_list_remove(bd->zone->container->clients, bd);
|
||||
bd->zone->container->clients = evas_list_append(bd->zone->container->clients, bd);
|
||||
borders = evas_list_remove(borders, bd);
|
||||
borders = evas_list_append(borders, bd);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_border_reorder_before(E_Border *bd, E_Border *before)
|
||||
{
|
||||
if (before)
|
||||
{
|
||||
bd->zone->container->clients = evas_list_remove(bd->zone->container->clients, bd);
|
||||
bd->zone->container->clients = evas_list_prepend_relative(bd->zone->container->clients, bd, before);
|
||||
borders = evas_list_remove(borders, bd);
|
||||
borders = evas_list_prepend_relative(borders, bd, before);
|
||||
}
|
||||
else
|
||||
{
|
||||
bd->zone->container->clients = evas_list_remove(bd->zone->container->clients, bd);
|
||||
bd->zone->container->clients = evas_list_prepend(bd->zone->container->clients, bd);
|
||||
borders = evas_list_remove(borders, bd);
|
||||
borders = evas_list_prepend(borders, bd);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
_e_border_cb_focus_fix(void *data)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
/* TODO List:
|
||||
*
|
||||
* * fix shape callbacks to be able to be safely deleted
|
||||
* * remove duplicate bd->layer -> layers code
|
||||
*
|
||||
*/
|
||||
|
||||
/* local subsystem functions */
|
||||
|
@ -508,6 +510,51 @@ e_container_shape_solid_rect_get(E_Container_Shape *es, int *x, int *y, int *w,
|
|||
* 200 = fullscreen
|
||||
* 999 = internal on top windows for E
|
||||
*/
|
||||
int
|
||||
e_container_borders_count(E_Container *con)
|
||||
{
|
||||
/* FIXME: This could be stored and not calculated */
|
||||
int num, i;
|
||||
|
||||
num = 0;
|
||||
for (i = 0; i < num; i++)
|
||||
num += evas_list_count(con->layers[i].clients);
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
void
|
||||
e_container_border_add(E_Border *bd)
|
||||
{
|
||||
int pos;
|
||||
|
||||
if (bd->layer == 0) pos = 0;
|
||||
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
||||
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
||||
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
||||
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
||||
else pos = 5;
|
||||
|
||||
bd->zone->container->layers[pos].clients =
|
||||
evas_list_append(bd->zone->container->layers[pos].clients, bd);
|
||||
}
|
||||
|
||||
void
|
||||
e_container_border_remove(E_Border *bd)
|
||||
{
|
||||
int pos;
|
||||
|
||||
if (bd->layer == 0) pos = 0;
|
||||
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
||||
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
||||
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
||||
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
||||
else pos = 5;
|
||||
|
||||
bd->zone->container->layers[pos].clients =
|
||||
evas_list_remove(bd->zone->container->layers[pos].clients, bd);
|
||||
}
|
||||
|
||||
void
|
||||
e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer)
|
||||
{
|
||||
|
@ -605,6 +652,78 @@ e_container_border_lower(E_Border *bd)
|
|||
evas_list_prepend(bd->zone->container->layers[pos].clients, bd);
|
||||
}
|
||||
|
||||
void
|
||||
e_container_border_stack_above(E_Border *bd, E_Border *above)
|
||||
{
|
||||
int pos;
|
||||
|
||||
/* Remove from old layer */
|
||||
if (bd->layer == 0) pos = 0;
|
||||
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
||||
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
||||
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
||||
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
||||
else pos = 5;
|
||||
|
||||
bd->zone->container->layers[pos].clients =
|
||||
evas_list_remove(bd->zone->container->layers[pos].clients, bd);
|
||||
|
||||
/* Add to new layer */
|
||||
bd->layer = above->layer;
|
||||
|
||||
if (bd->layer == 0) pos = 0;
|
||||
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
||||
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
||||
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
||||
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
||||
else pos = 5;
|
||||
|
||||
ecore_x_window_configure(bd->win,
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||
0, 0, 0, 0, 0,
|
||||
above->win, ECORE_X_WINDOW_STACK_ABOVE);
|
||||
|
||||
bd->zone->container->layers[pos].clients =
|
||||
evas_list_append_relative(bd->zone->container->layers[pos].clients, bd, above);
|
||||
}
|
||||
|
||||
void
|
||||
e_container_border_stack_below(E_Border *bd, E_Border *below)
|
||||
{
|
||||
int pos;
|
||||
|
||||
/* Remove from old layer */
|
||||
if (bd->layer == 0) pos = 0;
|
||||
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
||||
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
||||
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
||||
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
||||
else pos = 5;
|
||||
|
||||
bd->zone->container->layers[pos].clients =
|
||||
evas_list_remove(bd->zone->container->layers[pos].clients, bd);
|
||||
|
||||
/* Add to new layer */
|
||||
bd->layer = below->layer;
|
||||
|
||||
if (bd->layer == 0) pos = 0;
|
||||
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
||||
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
||||
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
||||
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
||||
else pos = 5;
|
||||
|
||||
ecore_x_window_configure(bd->win,
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||
0, 0, 0, 0, 0,
|
||||
below->win, ECORE_X_WINDOW_STACK_BELOW);
|
||||
|
||||
bd->zone->container->layers[pos].clients =
|
||||
evas_list_prepend_relative(bd->zone->container->layers[pos].clients, bd, below);
|
||||
}
|
||||
|
||||
E_Border_List *
|
||||
e_container_border_list_first(E_Container *con)
|
||||
{
|
||||
|
@ -629,6 +748,8 @@ e_container_border_list_last(E_Container *con)
|
|||
list->container = con;
|
||||
e_object_ref(E_OBJECT(con));
|
||||
list->layer = 6;
|
||||
if (list->clients = list->container->layers[list->layer].clients)
|
||||
list->clients = list->container->layers[list->layer].clients->last;
|
||||
while ((list->layer > 0) && (!list->clients))
|
||||
{
|
||||
list->layer--;
|
||||
|
|
|
@ -47,7 +47,6 @@ struct _E_Container
|
|||
|
||||
Evas_List *shapes;
|
||||
Evas_List *shape_change_cb;
|
||||
Evas_List *clients;
|
||||
Evas_List *zones;
|
||||
|
||||
struct {
|
||||
|
@ -124,10 +123,15 @@ EAPI void e_container_shape_rects_set(E_Container_Shape *es, Ecore
|
|||
EAPI void e_container_shape_solid_rect_set(E_Container_Shape *es, int x, int y, int w, int h);
|
||||
EAPI void e_container_shape_solid_rect_get(E_Container_Shape *es, int *x, int *y, int *w, int *h);
|
||||
|
||||
EAPI int e_container_borders_count(E_Container *con);
|
||||
EAPI void e_container_border_add(E_Border *bd);
|
||||
EAPI void e_container_border_remove(E_Border *bd);
|
||||
EAPI void e_container_window_raise(E_Container *con, Ecore_X_Window, int layer);
|
||||
EAPI void e_container_window_lower(E_Container *con, Ecore_X_Window, int layer);
|
||||
EAPI void e_container_border_raise(E_Border *bd);
|
||||
EAPI void e_container_border_lower(E_Border *bd);
|
||||
EAPI void e_container_border_stack_above(E_Border *bd, E_Border *above);
|
||||
EAPI void e_container_border_stack_below(E_Border *bd, E_Border *below);
|
||||
|
||||
extern EAPI int E_EVENT_CONTAINER_RESIZE;
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@ e_hints_init(void)
|
|||
void
|
||||
e_hints_client_list_set(void)
|
||||
{
|
||||
Evas_List *ml = NULL, *cl = NULL, *bl = NULL;
|
||||
Evas_List *ml = NULL, *cl = NULL;
|
||||
unsigned int i = 0, num = 0;
|
||||
E_Manager *m;
|
||||
E_Container *c;
|
||||
E_Border_List *bl;
|
||||
E_Border *b;
|
||||
Ecore_X_Window *clients = NULL;
|
||||
|
||||
|
@ -46,7 +47,7 @@ e_hints_client_list_set(void)
|
|||
for (cl = m->containers; cl; cl = cl->next)
|
||||
{
|
||||
c = cl->data;
|
||||
num += evas_list_count(c->clients);
|
||||
num += e_container_borders_count(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,11 +64,10 @@ e_hints_client_list_set(void)
|
|||
for (cl = m->containers; cl; cl = cl->next)
|
||||
{
|
||||
c = cl->data;
|
||||
for (bl = c->clients; bl; bl = bl->next)
|
||||
{
|
||||
b = bl->data;
|
||||
bl = e_container_border_list_first(c);
|
||||
while ((b = e_container_border_list_next(bl)))
|
||||
clients[i++] = b->win;
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
}
|
||||
}
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
|
@ -94,10 +94,11 @@ e_hints_client_list_set(void)
|
|||
void
|
||||
e_hints_client_stacking_set(void)
|
||||
{
|
||||
Evas_List *ml = NULL, *cl = NULL, *bl = NULL;
|
||||
Evas_List *ml = NULL, *cl = NULL;
|
||||
unsigned int i = 0, num = 0;
|
||||
E_Manager *m;
|
||||
E_Container *c;
|
||||
E_Border_List *bl;
|
||||
E_Border *b;
|
||||
Ecore_X_Window *clients = NULL;
|
||||
|
||||
|
@ -108,7 +109,7 @@ e_hints_client_stacking_set(void)
|
|||
for (cl = m->containers; cl; cl = cl->next)
|
||||
{
|
||||
c = cl->data;
|
||||
num += evas_list_count(c->clients);
|
||||
num += e_container_borders_count(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,11 +125,10 @@ e_hints_client_stacking_set(void)
|
|||
for (cl = m->containers; cl; cl = cl->next)
|
||||
{
|
||||
c = cl->data;
|
||||
for (bl = c->clients; bl; bl = bl->next)
|
||||
{
|
||||
b = bl->data;
|
||||
bl = e_container_border_list_first(c);
|
||||
while ((b = e_container_border_list_next(bl)))
|
||||
clients[i++] = b->win;
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
}
|
||||
}
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
|
|
|
@ -7,15 +7,15 @@ void
|
|||
e_place_zone_region_smart_cleanup(E_Zone *zone)
|
||||
{
|
||||
E_Desk *desk;
|
||||
Evas_List *l, *borders = NULL;
|
||||
Evas_List *borders = NULL;
|
||||
E_Border_List *bl;
|
||||
E_Border *border;
|
||||
|
||||
E_OBJECT_CHECK(zone);
|
||||
desk = e_desk_current_get(zone);
|
||||
for (l = e_border_clients_get(); l; l = l->next)
|
||||
bl = e_container_border_list_first(desk->zone->container);
|
||||
while ((border = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *border;
|
||||
|
||||
border = l->data;
|
||||
/* Build a list of windows on this desktop and not iconified. */
|
||||
if ((border->desk == desk) && !(border->iconic))
|
||||
{
|
||||
|
@ -41,6 +41,7 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
|
|||
if (!ll) borders = evas_list_append(borders, border);
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
/* Loop over the borders moving each one using the smart placement */
|
||||
while (borders)
|
||||
|
@ -61,7 +62,9 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
{
|
||||
int a_w = 0, a_h = 0;
|
||||
int *a_x = NULL, *a_y = NULL;
|
||||
Evas_List *l, *ll;
|
||||
Evas_List *ll;
|
||||
E_Border_List *bl;
|
||||
E_Border *bd;
|
||||
|
||||
a_w = 2;
|
||||
a_h = 2;
|
||||
|
@ -76,13 +79,12 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
a_y[0] = 0;
|
||||
a_y[1] = zone->h;
|
||||
|
||||
for (l = zone->container->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(zone->container);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *bd;
|
||||
int ok;
|
||||
|
||||
ok = 1;
|
||||
bd = l->data;
|
||||
for (ll = skiplist; ll; ll = ll->next)
|
||||
{
|
||||
if (ll->data == bd)
|
||||
|
@ -189,6 +191,8 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
}
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
{
|
||||
int i, j;
|
||||
int area = 0x7fffffff;
|
||||
|
@ -202,14 +206,13 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
{
|
||||
int ar = 0;
|
||||
|
||||
for (l = zone->container->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(zone->container);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *bd;
|
||||
int x1, y1, w1, h1, x2, y2, w2, h2;
|
||||
int ok;
|
||||
|
||||
ok = 1;
|
||||
bd = l->data;
|
||||
x1 = a_x[i];
|
||||
y1 = a_y[j];
|
||||
w1 = w;
|
||||
|
@ -251,6 +254,8 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
ar += (iw * ih);
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
if (ar < area)
|
||||
{
|
||||
area = ar;
|
||||
|
@ -264,14 +269,14 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
{
|
||||
int ar = 0;
|
||||
|
||||
for (l = zone->container->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(zone->container);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *bd;
|
||||
int x1, y1, w1, h1, x2, y2, w2, h2;
|
||||
int ok;
|
||||
|
||||
ok = 1;
|
||||
bd = l->data;
|
||||
x1 = a_x[i + 1] - w;
|
||||
y1 = a_y[j];
|
||||
w1 = w;
|
||||
|
@ -313,6 +318,8 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
ar += (iw * ih);
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
if (ar < area)
|
||||
{
|
||||
area = ar;
|
||||
|
@ -326,14 +333,14 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
{
|
||||
int ar = 0;
|
||||
|
||||
for (l = zone->container->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(zone->container);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *bd;
|
||||
int x1, y1, w1, h1, x2, y2, w2, h2;
|
||||
int ok;
|
||||
|
||||
ok = 1;
|
||||
bd = l->data;
|
||||
x1 = a_x[i + 1] - w;
|
||||
y1 = a_y[j + 1] - h;
|
||||
w1 = w;
|
||||
|
@ -375,6 +382,8 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
ar += (iw * ih);
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
if (ar < area)
|
||||
{
|
||||
area = ar;
|
||||
|
@ -388,14 +397,14 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
{
|
||||
int ar = 0;
|
||||
|
||||
for (l = zone->container->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(zone->container);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *bd;
|
||||
int x1, y1, w1, h1, x2, y2, w2, h2;
|
||||
int ok;
|
||||
|
||||
ok = 1;
|
||||
bd = l->data;
|
||||
x1 = a_x[i];
|
||||
y1 = a_y[j + 1] - h;
|
||||
w1 = w;
|
||||
|
@ -437,6 +446,8 @@ e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w
|
|||
ar += (iw * ih);
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
if (ar < area)
|
||||
{
|
||||
area = ar;
|
||||
|
|
|
@ -26,6 +26,8 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
|
|||
int gad_resist = 32;
|
||||
Evas_List *l, *ll, *rects = NULL;
|
||||
E_Resist_Rect *r;
|
||||
E_Border_List *bl;
|
||||
E_Border *bd;
|
||||
|
||||
/* FIXME: get resist values from config */
|
||||
if (!resist)
|
||||
|
@ -63,11 +65,11 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
|
|||
/* can add code here to add more fake obstacles with custom resist values */
|
||||
/* here if need be - ie xinerama middle between screens and panels etc. */
|
||||
|
||||
for (l = con->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(con);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
E_Border *bd;
|
||||
|
||||
bd = l->data;
|
||||
if (bd->visible)
|
||||
{
|
||||
int ok;
|
||||
|
@ -87,6 +89,8 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
|
|||
}
|
||||
}
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
for (l = con->gadman->clients; l; l = l->next)
|
||||
{
|
||||
E_Gadman_Client *gmc;
|
||||
|
|
|
@ -502,7 +502,8 @@ _pager_desk_new(Pager_Face *face, E_Desk *desk, int xpos, int ypos)
|
|||
{
|
||||
Pager_Desk *pd;
|
||||
Evas_Object *o;
|
||||
Evas_List *l;
|
||||
E_Border_List *bl;
|
||||
E_Border *bd;
|
||||
|
||||
pd = E_NEW(Pager_Desk, 1);
|
||||
if (!pd) return NULL;
|
||||
|
@ -545,17 +546,17 @@ _pager_desk_new(Pager_Face *face, E_Desk *desk, int xpos, int ypos)
|
|||
|
||||
if (desk == e_desk_current_get(desk->zone)) _pager_face_desk_select(pd);
|
||||
|
||||
for (l = desk->zone->container->clients; l; l = l->next)
|
||||
bl = e_container_border_list_first(desk->zone->container);
|
||||
while ((bd = e_container_border_list_next(bl)))
|
||||
{
|
||||
Pager_Win *pw;
|
||||
E_Border *bd;
|
||||
|
||||
bd = l->data;
|
||||
if ((bd->new_client) || (bd->desk != desk)) continue;
|
||||
pw = _pager_window_new(pd, bd);
|
||||
if (pw)
|
||||
pd->wins = evas_list_append(pd->wins, pw);
|
||||
}
|
||||
e_container_border_list_free(bl);
|
||||
|
||||
return pd;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue