forked from enlightenment/enlightenment
E: Revert change in layer to pos map
Seems there is a lot of code which is connected to the current mapping, and no need to create a lot of fuzz because of one unused layer. SVN revision: 77309
This commit is contained in:
parent
591a74834d
commit
4735da0b0c
|
@ -569,7 +569,7 @@ _e_container_layer_map(E_Layer layer)
|
|||
{
|
||||
int pos = 0;
|
||||
|
||||
pos = layer / 50;
|
||||
pos = 1 + (layer / 50);
|
||||
if (pos > 10) pos = 10;
|
||||
return pos;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ typedef enum _E_Layer
|
|||
E_LAYER_FULLSCREEN = 300,
|
||||
E_LAYER_TOP = 350,
|
||||
E_LAYER_DRAG = 400,
|
||||
E_LAYER_PRIO = 500
|
||||
E_LAYER_PRIO = 450
|
||||
} E_Layer;
|
||||
|
||||
typedef struct _E_Container E_Container;
|
||||
|
|
|
@ -126,13 +126,15 @@ _policy_border_resize(E_Border *bd, int w, int h)
|
|||
static void
|
||||
_policy_border_hide_above(E_Border *bd)
|
||||
{
|
||||
int pos = 0, i;
|
||||
int pos = 0, layer = 0, i;
|
||||
|
||||
if (!bd) return;
|
||||
|
||||
/* determine layering position */
|
||||
pos = (bd->layer / 50);
|
||||
if (pos >= 10) return;
|
||||
layer = bd->layer;
|
||||
if (layer < 0) layer = 0;
|
||||
pos = 1 + (layer / 50);
|
||||
if (pos > 10) pos = 10;
|
||||
|
||||
/* Find the windows above this one */
|
||||
for (i = (pos + 1); i < 11; i++)
|
||||
|
@ -163,13 +165,14 @@ _policy_border_hide_above(E_Border *bd)
|
|||
static void
|
||||
_policy_border_hide_below(E_Border *bd)
|
||||
{
|
||||
int pos = 0, i;
|
||||
int pos = 0, layer = 0, i;
|
||||
|
||||
if (!bd) return;
|
||||
|
||||
/* determine layering position */
|
||||
pos = (bd->layer / 50);
|
||||
if (pos == 0) return;
|
||||
layer = bd->layer;
|
||||
if (layer < 0) layer = 0;
|
||||
pos = 1 + (layer / 50);
|
||||
if (pos > 10) pos = 10;
|
||||
|
||||
/* Find the windows below this one */
|
||||
|
@ -215,7 +218,7 @@ _policy_border_show_below(E_Border *bd)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Border *prev;
|
||||
int pos = 0, i;
|
||||
int pos = 0, layer = 0, i;
|
||||
|
||||
// printf("Show Borders Below: %s %d %d\n",
|
||||
// bd->client.icccm.class, bd->x, bd->y);
|
||||
|
@ -232,7 +235,9 @@ _policy_border_show_below(E_Border *bd)
|
|||
}
|
||||
|
||||
/* determine layering position */
|
||||
pos = (bd->layer / 50);
|
||||
layer = bd->layer;
|
||||
if (layer < 0) layer = 0;
|
||||
pos = 1 + (layer / 50);
|
||||
if (pos > 10) pos = 10;
|
||||
|
||||
/* Find the windows below this one */
|
||||
|
|
|
@ -118,12 +118,15 @@ _policy_border_hide_below(E_Border *bd)
|
|||
if (!bd) return;
|
||||
/* printf("_policy_border_hide_below %s\n", e_border_name_get(bd)); */
|
||||
/* determine layering position */
|
||||
pos = (bd->layer / 50);
|
||||
if (pos <= 0) return;
|
||||
if (pos > 5) pos = 5;
|
||||
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;
|
||||
|
||||
/* Find the windows below this one */
|
||||
for (i = pos; i >= 1; i--)
|
||||
for (i = pos; i >= 2; i--)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Border *b;
|
||||
|
|
Loading…
Reference in New Issue