forked from enlightenment/enlightenment
parent
0cd33edb84
commit
e174baf5d1
|
@ -416,7 +416,7 @@ e_border_show(E_Border *bd)
|
||||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||||
if (bd->visible) return;
|
if (bd->visible) return;
|
||||||
e_container_shape_show(bd->shape);
|
e_container_shape_show(bd->shape);
|
||||||
e_container_window_show(bd->zone->container, bd->client.win, bd->layer);
|
ecore_x_window_show(bd->client.win);
|
||||||
e_hints_window_visible_set(bd);
|
e_hints_window_visible_set(bd);
|
||||||
bd->visible = 1;
|
bd->visible = 1;
|
||||||
bd->changes.visible = 1;
|
bd->changes.visible = 1;
|
||||||
|
@ -441,7 +441,7 @@ e_border_hide(E_Border *bd, int manage)
|
||||||
if (!bd->visible) return;
|
if (!bd->visible) return;
|
||||||
if (bd->moving) return;
|
if (bd->moving) return;
|
||||||
|
|
||||||
e_container_window_hide(bd->zone->container, bd->client.win, bd->layer);
|
ecore_x_window_hide(bd->client.win);
|
||||||
e_container_shape_hide(bd->shape);
|
e_container_shape_hide(bd->shape);
|
||||||
if (!bd->iconic)
|
if (!bd->iconic)
|
||||||
e_hints_window_hidden_set(bd);
|
e_hints_window_hidden_set(bd);
|
||||||
|
@ -593,7 +593,7 @@ e_border_raise(E_Border *bd)
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||||
_e_border_reorder_after(bd, NULL);
|
_e_border_reorder_after(bd, NULL);
|
||||||
e_container_window_raise(bd->zone->container, bd->win, bd->layer);
|
e_container_border_raise(bd);
|
||||||
{
|
{
|
||||||
E_Event_Border_Raise *ev;
|
E_Event_Border_Raise *ev;
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ e_border_lower(E_Border *bd)
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
|
||||||
_e_border_reorder_before(bd, NULL);
|
_e_border_reorder_before(bd, NULL);
|
||||||
e_container_window_lower(bd->zone->container, bd->win, bd->layer);
|
e_container_border_lower(bd);
|
||||||
{
|
{
|
||||||
E_Event_Border_Lower *ev;
|
E_Event_Border_Lower *ev;
|
||||||
|
|
||||||
|
@ -969,6 +969,8 @@ e_border_fullscreen(E_Border *bd)
|
||||||
if ((bd->shaded) || (bd->shading)) return;
|
if ((bd->shaded) || (bd->shading)) return;
|
||||||
if (!bd->fullscreen)
|
if (!bd->fullscreen)
|
||||||
{
|
{
|
||||||
|
int layer;
|
||||||
|
|
||||||
bd->saved.x = bd->x;
|
bd->saved.x = bd->x;
|
||||||
bd->saved.y = bd->y;
|
bd->saved.y = bd->y;
|
||||||
bd->saved.w = bd->w;
|
bd->saved.w = bd->w;
|
||||||
|
@ -976,7 +978,10 @@ e_border_fullscreen(E_Border *bd)
|
||||||
|
|
||||||
e_hints_window_fullscreen_set(bd, 1);
|
e_hints_window_fullscreen_set(bd, 1);
|
||||||
|
|
||||||
e_container_window_raise(bd->zone->container, bd->win, 200);
|
layer = bd->layer;
|
||||||
|
bd->layer = 200;
|
||||||
|
e_border_raise(bd);
|
||||||
|
bd->layer = layer;
|
||||||
e_border_move_resize(bd,
|
e_border_move_resize(bd,
|
||||||
bd->zone->x - bd->client_inset.l,
|
bd->zone->x - bd->client_inset.l,
|
||||||
bd->zone->y - bd->client_inset.t,
|
bd->zone->y - bd->client_inset.t,
|
||||||
|
@ -1185,7 +1190,7 @@ e_border_idler_before(void)
|
||||||
if ((bd->changes.visible) && (bd->visible))
|
if ((bd->changes.visible) && (bd->visible))
|
||||||
{
|
{
|
||||||
ecore_evas_show(bd->bg_ecore_evas);
|
ecore_evas_show(bd->bg_ecore_evas);
|
||||||
e_container_window_show(bd->zone->container, bd->win, bd->layer);
|
ecore_x_window_show(bd->win);
|
||||||
bd->changes.visible = 0;
|
bd->changes.visible = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1197,7 +1202,7 @@ e_border_idler_before(void)
|
||||||
bd = l->data;
|
bd = l->data;
|
||||||
if ((bd->changes.visible) && (!bd->visible))
|
if ((bd->changes.visible) && (!bd->visible))
|
||||||
{
|
{
|
||||||
e_container_window_hide(bd->zone->container, bd->win, bd->layer);
|
ecore_x_window_hide(bd->win);
|
||||||
ecore_evas_hide(bd->bg_ecore_evas);
|
ecore_evas_hide(bd->bg_ecore_evas);
|
||||||
bd->changes.visible = 0;
|
bd->changes.visible = 0;
|
||||||
}
|
}
|
||||||
|
@ -3867,7 +3872,7 @@ _e_border_menu_cb_on_top(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
bd->layer = 150;
|
bd->layer = 150;
|
||||||
e_hints_window_stacking_set(bd, E_STACKING_ABOVE);
|
e_hints_window_stacking_set(bd, E_STACKING_ABOVE);
|
||||||
}
|
}
|
||||||
e_container_window_raise(bd->zone->container, bd->win, bd->layer);
|
e_container_border_raise(bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -508,24 +508,11 @@ e_container_shape_solid_rect_get(E_Container_Shape *es, int *x, int *y, int *w,
|
||||||
* 200 = fullscreen
|
* 200 = fullscreen
|
||||||
* 999 = internal on top windows for E
|
* 999 = internal on top windows for E
|
||||||
*/
|
*/
|
||||||
void
|
|
||||||
e_container_window_show(E_Container *con, Ecore_X_Window win, int layer)
|
|
||||||
{
|
|
||||||
ecore_x_window_show(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
e_container_window_hide(E_Container *con, Ecore_X_Window win, int layer)
|
|
||||||
{
|
|
||||||
ecore_x_window_hide(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer)
|
e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer)
|
||||||
{
|
{
|
||||||
int pos, i;
|
int pos;
|
||||||
E_Border *bd;
|
|
||||||
|
|
||||||
if (layer == 0) pos = 1;
|
if (layer == 0) pos = 1;
|
||||||
else if ((layer > 0) && (layer <= 50)) pos = 2;
|
else if ((layer > 0) && (layer <= 50)) pos = 2;
|
||||||
else if ((layer > 50) && (layer <= 100)) pos = 3;
|
else if ((layer > 50) && (layer <= 100)) pos = 3;
|
||||||
|
@ -538,21 +525,13 @@ e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer)
|
||||||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||||
0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0,
|
||||||
con->layers[pos].win, ECORE_X_WINDOW_STACK_BELOW);
|
con->layers[pos].win, ECORE_X_WINDOW_STACK_BELOW);
|
||||||
|
|
||||||
bd = e_border_find_by_client_window(win);
|
|
||||||
if (!bd) return;
|
|
||||||
/* FIXME, remember the old layer if layer is changed. */
|
|
||||||
for (i = 0; i < 7; i++)
|
|
||||||
con->layers[i].clients = evas_list_remove(con->layers[i].clients, bd);
|
|
||||||
con->layers[pos - 1].clients = evas_list_append(con->layers[pos - 1].clients, bd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer)
|
e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer)
|
||||||
{
|
{
|
||||||
int pos, i;
|
int pos;
|
||||||
E_Border *bd;
|
|
||||||
|
|
||||||
if (layer == 0) pos = 0;
|
if (layer == 0) pos = 0;
|
||||||
else if ((layer > 0) && (layer <= 50)) pos = 1;
|
else if ((layer > 0) && (layer <= 50)) pos = 1;
|
||||||
else if ((layer > 50) && (layer <= 100)) pos = 2;
|
else if ((layer > 50) && (layer <= 100)) pos = 2;
|
||||||
|
@ -565,13 +544,65 @@ e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer)
|
||||||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||||
0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0,
|
||||||
con->layers[pos].win, ECORE_X_WINDOW_STACK_ABOVE);
|
con->layers[pos].win, ECORE_X_WINDOW_STACK_ABOVE);
|
||||||
|
}
|
||||||
|
void
|
||||||
|
e_container_border_raise(E_Border *bd)
|
||||||
|
{
|
||||||
|
int pos, i;
|
||||||
|
|
||||||
bd = e_border_find_by_client_window(win);
|
/* Remove from old layer */
|
||||||
if (!bd) return;
|
|
||||||
/* FIXME, remember the old layer if layer is changed. */
|
|
||||||
for (i = 0; i < 7; i++)
|
for (i = 0; i < 7; i++)
|
||||||
con->layers[i].clients = evas_list_remove(con->layers[i].clients, bd);
|
{
|
||||||
con->layers[pos].clients = evas_list_prepend(con->layers[pos].clients, bd);
|
bd->zone->container->layers[i].clients =
|
||||||
|
evas_list_remove(bd->zone->container->layers[i].clients, bd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add to new layer */
|
||||||
|
if (bd->layer == 0) pos = 1;
|
||||||
|
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 2;
|
||||||
|
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 3;
|
||||||
|
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 4;
|
||||||
|
else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 5;
|
||||||
|
else pos = 6;
|
||||||
|
|
||||||
|
ecore_x_window_configure(bd->win,
|
||||||
|
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
|
||||||
|
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
|
||||||
|
0, 0, 0, 0, 0,
|
||||||
|
bd->zone->container->layers[pos].win, ECORE_X_WINDOW_STACK_BELOW);
|
||||||
|
|
||||||
|
bd->zone->container->layers[pos - 1].clients =
|
||||||
|
evas_list_append(bd->zone->container->layers[pos - 1].clients, bd);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_container_border_lower(E_Border *bd)
|
||||||
|
{
|
||||||
|
int pos, i;
|
||||||
|
|
||||||
|
/* Remove from old layer */
|
||||||
|
for (i = 0; i < 7; i++)
|
||||||
|
{
|
||||||
|
bd->zone->container->layers[i].clients =
|
||||||
|
evas_list_remove(bd->zone->container->layers[i].clients, bd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add to new 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,
|
||||||
|
bd->zone->container->layers[pos].win, ECORE_X_WINDOW_STACK_ABOVE);
|
||||||
|
|
||||||
|
bd->zone->container->layers[pos].clients =
|
||||||
|
evas_list_prepend(bd->zone->container->layers[pos].clients, bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
|
|
|
@ -110,10 +110,10 @@ 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_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 void e_container_shape_solid_rect_get(E_Container_Shape *es, int *x, int *y, int *w, int *h);
|
||||||
|
|
||||||
EAPI void e_container_window_show(E_Container *con, Ecore_X_Window, int layer);
|
|
||||||
EAPI void e_container_window_hide(E_Container *con, Ecore_X_Window, int layer);
|
|
||||||
EAPI void e_container_window_raise(E_Container *con, Ecore_X_Window, int layer);
|
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_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);
|
||||||
|
|
||||||
extern EAPI int E_EVENT_CONTAINER_RESIZE;
|
extern EAPI int E_EVENT_CONTAINER_RESIZE;
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ e_hints_window_init(E_Border *bd)
|
||||||
bd->layer = 150;
|
bd->layer = 150;
|
||||||
else
|
else
|
||||||
bd->layer = 100;
|
bd->layer = 100;
|
||||||
e_container_window_raise(bd->zone->container, bd->win, bd->layer);
|
e_container_border_raise(bd);
|
||||||
|
|
||||||
if (bd->client.netwm.state.sticky)
|
if (bd->client.netwm.state.sticky)
|
||||||
e_border_stick(bd);
|
e_border_stick(bd);
|
||||||
|
|
Loading…
Reference in New Issue