diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 724b7a571..68ab70ead 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -1706,7 +1706,7 @@ e_border_resize_without_border(E_Border *bd, EAPI void e_border_layer_set(E_Border *bd, - int layer) + E_Layer layer) { int oldraise; @@ -1722,7 +1722,7 @@ e_border_layer_set(E_Border *bd, bd->saved.layer = layer; return; } - if (bd->layer != 300) + if (bd->layer != E_LAYER_FULLSCREEN) bd->saved.layer = bd->layer; bd->layer = layer; if (e_config->transient.layer) @@ -1743,6 +1743,12 @@ e_border_layer_set(E_Border *bd, } } e_border_raise(bd); + if (layer == E_LAYER_BELOW) + e_hints_window_stacking_set(bd, E_STACKING_BELOW); + else if (layer == E_LAYER_ABOVE) + e_hints_window_stacking_set(bd, E_STACKING_ABOVE); + else + e_hints_window_stacking_set(bd, E_STACKING_NONE); e_config->transient.raise = oldraise; } @@ -2965,7 +2971,7 @@ e_border_fullscreen(E_Border *bd, /* e_zone_fullscreen_set(bd->zone, 1); */ if (!e_config->allow_above_fullscreen) - e_border_layer_set(bd, 300); + e_border_layer_set(bd, E_LAYER_FULLSCREEN); if ((eina_list_count(bd->zone->container->zones) > 1) || (policy == E_FULLSCREEN_RESIZE) || (!ecore_x_randr_query())) @@ -3253,26 +3259,18 @@ EAPI void e_border_pinned_set(E_Border *bd, int set) { - int layer; - int stacking; + E_Layer layer; if (bd) { bd->borderless = set; bd->user_skip_winlist = set; if (set) - { - layer = 50; - stacking = E_STACKING_BELOW; - } + layer = E_LAYER_BELOW; else - { - layer = 100; - stacking = E_STACKING_NONE; - } + layer = E_LAYER_NORMAL; e_border_layer_set(bd, layer); - e_hints_window_stacking_set(bd, stacking); bd->client.border.changed = 1; bd->changed = 1; diff --git a/src/bin/e_border.h b/src/bin/e_border.h index a86244030..4adde0e79 100644 --- a/src/bin/e_border.h +++ b/src/bin/e_border.h @@ -549,7 +549,7 @@ struct _E_Border struct { int x, y, w, h; - unsigned int layer; + E_Layer layer; int zone; E_Maximize maximized; unsigned int event_mask; @@ -610,7 +610,7 @@ struct _E_Border int x, y; } drag; - unsigned int layer; + E_Layer layer; E_Action *cur_mouse_action; Ecore_Timer *raise_timer; Ecore_Poller *ping_poller; @@ -708,7 +708,7 @@ EAPI void e_border_resize(E_Border *bd, int w, int h); EAPI void e_border_resize_without_border(E_Border *bd, int w, int h); EAPI void e_border_move_resize(E_Border *bd, int x, int y, int w, int h); EAPI void e_border_move_resize_without_border(E_Border *bd, int x, int y, int w, int h); -EAPI void e_border_layer_set(E_Border *bd, int layer); +EAPI void e_border_layer_set(E_Border *bd, E_Layer layer); EAPI void e_border_raise(E_Border *bd); EAPI void e_border_lower(E_Border *bd); EAPI void e_border_stack_above(E_Border *bd, E_Border *above); diff --git a/src/bin/e_container.c b/src/bin/e_container.c index 80a85692c..9deb5e4c9 100644 --- a/src/bin/e_container.c +++ b/src/bin/e_container.c @@ -565,12 +565,11 @@ e_container_borders_count(E_Container *con) } static int -_e_container_layer_map(int layer) +_e_container_layer_map(E_Layer layer) { int pos = 0; - if (layer < 0) layer = 0; - pos = 1 + (layer / 50); + pos = layer / 50; if (pos > 10) pos = 10; return pos; } @@ -604,7 +603,7 @@ e_container_border_remove(E_Border *bd) } EAPI 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, E_Layer layer) { int pos = _e_container_layer_map(layer); ecore_x_window_configure(win, @@ -615,7 +614,7 @@ e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer) } EAPI 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, E_Layer layer) { int pos = _e_container_layer_map(layer); ecore_x_window_configure(win, diff --git a/src/bin/e_container.h b/src/bin/e_container.h index 25a9e4624..2f719412f 100644 --- a/src/bin/e_container.h +++ b/src/bin/e_container.h @@ -11,6 +11,20 @@ typedef enum _E_Container_Shape_Change E_CONTAINER_SHAPE_RECTS } E_Container_Shape_Change; +typedef enum _E_Layer +{ + E_LAYER_DESKTOP = 0, + E_LAYER_BELOW = 50, + E_LAYER_NORMAL = 100, + E_LAYER_ABOVE = 150, + E_LAYER_POPUP = 200, + E_LAYER_EDGE = 250, + E_LAYER_FULLSCREEN = 300, + E_LAYER_TOP = 350, + E_LAYER_DRAG = 400, + E_LAYER_PRIO = 500 +} E_Layer; + typedef struct _E_Container E_Container; typedef struct _E_Border_List E_Border_List; typedef struct _E_Container_Shape E_Container_Shape; @@ -128,8 +142,8 @@ EAPI void e_container_shape_solid_rect_get(E_Container_Shape *es, 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 win, int layer); -EAPI void e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer); +EAPI void e_container_window_raise(E_Container *con, Ecore_X_Window win, E_Layer layer); +EAPI void e_container_window_lower(E_Container *con, Ecore_X_Window win, E_Layer layer); EAPI E_Border *e_container_border_raise(E_Border *bd); EAPI E_Border *e_container_border_lower(E_Border *bd); EAPI void e_container_border_stack_above(E_Border *bd, E_Border *above); diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c index b1d7a90c0..aeadc1d7f 100644 --- a/src/bin/e_desklock.c +++ b/src/bin/e_desklock.c @@ -8,7 +8,6 @@ #define E_DESKLOCK_STATE_CHECKING 1 #define E_DESKLOCK_STATE_INVALID 2 -#define ELOCK_POPUP_LAYER 10000 #define PASSWD_LEN 256 /**************************** private data ******************************/ @@ -36,7 +35,7 @@ struct _E_Desklock_Data Ecore_X_Window elock_grab_break_wnd; char passwd[PASSWD_LEN]; int state; - Eina_Bool selected : 1; + Eina_Bool selected : 1; }; struct _E_Desklock_Run @@ -441,7 +440,7 @@ _e_desklock_popup_add(E_Zone *zone) evas_event_feed_mouse_move(edp->popup_wnd->evas, -1000000, -1000000, ecore_x_current_time_get(), NULL); - e_popup_layer_set(edp->popup_wnd, ELOCK_POPUP_LAYER); + e_popup_layer_set(edp->popup_wnd, E_LAYER_PRIO); ecore_evas_raise(edp->popup_wnd->ecore_evas); evas_event_freeze(edp->popup_wnd->evas); diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index d719c9f22..f18397a9e 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -175,7 +175,7 @@ e_drag_new(E_Container *container, int x, int y, drag->y = y; drag->w = 24; drag->h = 24; - drag->layer = 250; + drag->layer = E_LAYER_DRAG; drag->container = container; e_object_ref(E_OBJECT(drag->container)); drag->ecore_evas = e_canvas_new(drag->container->win, diff --git a/src/bin/e_dnd.h b/src/bin/e_dnd.h index 95373b896..d8583471f 100644 --- a/src/bin/e_dnd.h +++ b/src/bin/e_dnd.h @@ -50,7 +50,7 @@ struct _E_Drag int shape_rects_num; Ecore_X_Rectangle *shape_rects; - unsigned int layer; + E_Layer layer; unsigned char visible : 1; unsigned char need_shape_export : 1; unsigned char xy_update : 1; diff --git a/src/bin/e_gadcon_popup.c b/src/bin/e_gadcon_popup.c index 7bd2af81a..6569cdf57 100644 --- a/src/bin/e_gadcon_popup.c +++ b/src/bin/e_gadcon_popup.c @@ -20,7 +20,7 @@ e_gadcon_popup_new(E_Gadcon_Client *gcc) if (!pop) return NULL; zone = e_gadcon_client_zone_get(gcc); pop->win = e_popup_new(zone, 0, 0, 0, 0); - e_popup_layer_set(pop->win, 350); + e_popup_layer_set(pop->win, E_LAYER_POPUP); o = edje_object_add(pop->win->evas); e_theme_edje_object_set(o, "base/theme/gadman", "e/gadman/popup"); diff --git a/src/bin/e_grab_dialog.c b/src/bin/e_grab_dialog.c index b3e50913b..342c63daf 100644 --- a/src/bin/e_grab_dialog.c +++ b/src/bin/e_grab_dialog.c @@ -161,8 +161,7 @@ e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key eg->handlers = eina_list_append(eg->handlers, eh); } e_dialog_show(eg->dia); - e_border_layer_set(eg->dia->win->border, 150); - e_hints_window_stacking_set(eg->dia->win->border, E_STACKING_ABOVE); + e_border_layer_set(eg->dia->win->border, E_LAYER_ABOVE); if (parent) e_dialog_parent_set(eg->dia, parent); return eg; diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index bc837ed79..975e24c26 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -430,15 +430,15 @@ e_hints_window_init(E_Border *bd) if (!bd->lock_client_stacking) { if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DESKTOP) - e_border_layer_set(bd, 0); + e_border_layer_set(bd, E_LAYER_DESKTOP); else if (bd->client.netwm.state.stacking == E_STACKING_BELOW) - e_border_layer_set(bd, 50); + e_border_layer_set(bd, E_LAYER_BELOW); else if (bd->client.netwm.state.stacking == E_STACKING_ABOVE) - e_border_layer_set(bd, 150); + e_border_layer_set(bd, E_LAYER_ABOVE); else if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DOCK) - e_border_layer_set(bd, 150); + e_border_layer_set(bd, E_LAYER_ABOVE); else - e_border_layer_set(bd, 100); + e_border_layer_set(bd, E_LAYER_NORMAL); } else e_border_raise(bd); @@ -896,26 +896,18 @@ e_hints_window_state_update(E_Border *bd, switch (action) { case ECORE_X_WINDOW_STATE_ACTION_REMOVE: - e_border_layer_set(bd, 100); - e_hints_window_stacking_set(bd, E_STACKING_NONE); + e_border_layer_set(bd, E_LAYER_NORMAL); break; case ECORE_X_WINDOW_STATE_ACTION_ADD: - e_hints_window_stacking_set(bd, E_STACKING_ABOVE); - e_border_layer_set(bd, 150); + e_border_layer_set(bd, E_LAYER_ABOVE); break; case ECORE_X_WINDOW_STATE_ACTION_TOGGLE: - if (bd->layer == 150) - { - e_hints_window_stacking_set(bd, E_STACKING_NONE); - e_border_layer_set(bd, 100); - } + if (bd->layer == E_LAYER_ABOVE) + e_border_layer_set(bd, E_LAYER_NORMAL); else - { - e_hints_window_stacking_set(bd, E_STACKING_ABOVE); - e_border_layer_set(bd, 150); - } + e_border_layer_set(bd, E_LAYER_ABOVE); break; } break; @@ -927,26 +919,18 @@ e_hints_window_state_update(E_Border *bd, switch (action) { case ECORE_X_WINDOW_STATE_ACTION_REMOVE: - e_hints_window_stacking_set(bd, E_STACKING_NONE); - e_border_layer_set(bd, 100); + e_border_layer_set(bd, E_LAYER_NORMAL); break; case ECORE_X_WINDOW_STATE_ACTION_ADD: - e_hints_window_stacking_set(bd, E_STACKING_BELOW); - e_border_layer_set(bd, 50); + e_border_layer_set(bd, E_LAYER_BELOW); break; case ECORE_X_WINDOW_STATE_ACTION_TOGGLE: - if (bd->layer == 50) - { - e_hints_window_stacking_set(bd, E_STACKING_NONE); - e_border_layer_set(bd, 100); - } + if (bd->layer == E_LAYER_BELOW) + e_border_layer_set(bd, E_LAYER_NORMAL); else - { - e_hints_window_stacking_set(bd, E_STACKING_BELOW); - e_border_layer_set(bd, 50); - } + e_border_layer_set(bd, E_LAYER_BELOW); break; } break; diff --git a/src/bin/e_int_border_menu.c b/src/bin/e_int_border_menu.c index d25ece313..2f24bbed3 100644 --- a/src/bin/e_int_border_menu.c +++ b/src/bin/e_int_border_menu.c @@ -789,11 +789,8 @@ _e_border_menu_cb_on_top(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNU E_Border *bd; bd = data; - if (bd->layer != 150) - { - e_border_layer_set(bd, 150); - e_hints_window_stacking_set(bd, E_STACKING_ABOVE); - } + if (bd->layer != E_LAYER_ABOVE) + e_border_layer_set(bd, E_LAYER_ABOVE); } static void @@ -802,11 +799,8 @@ _e_border_menu_cb_below(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUS E_Border *bd; bd = data; - if (bd->layer != 50) - { - e_border_layer_set(bd, 50); - e_hints_window_stacking_set(bd, E_STACKING_BELOW); - } + if (bd->layer != E_LAYER_BELOW) + e_border_layer_set(bd, E_LAYER_BELOW); } static void @@ -815,11 +809,8 @@ _e_border_menu_cb_normal(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNU E_Border *bd; bd = data; - if (bd->layer != 100) - { - e_border_layer_set(bd, 100); - e_hints_window_stacking_set(bd, E_STACKING_NONE); - } + if (bd->layer != E_LAYER_NORMAL) + e_border_layer_set(bd, E_LAYER_NORMAL); } static void diff --git a/src/bin/e_int_shelf_config.c b/src/bin/e_int_shelf_config.c index cd32dc738..856e1111a 100644 --- a/src/bin/e_int_shelf_config.c +++ b/src/bin/e_int_shelf_config.c @@ -86,7 +86,7 @@ _fill_data(E_Config_Dialog_Data *cfdata) cfdata->layer = 0; else if ((cfdata->escfg->popup) && (cfdata->escfg->layer == 0)) cfdata->layer = 1; - else if ((cfdata->escfg->popup) && (cfdata->escfg->layer == 200)) + else if ((cfdata->escfg->popup) && (cfdata->escfg->layer == E_LAYER_ABOVE)) cfdata->layer = 2; else cfdata->layer = 2; @@ -329,10 +329,10 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) } else if (cfdata->layer == 2) { - if ((cfdata->escfg->popup != 1) || (cfdata->escfg->layer != 200)) + if ((cfdata->escfg->popup != 1) || (cfdata->escfg->layer != E_LAYER_ABOVE)) { cfdata->escfg->popup = 1; - cfdata->escfg->layer = 200; + cfdata->escfg->layer = E_LAYER_ABOVE; recreate = 1; } } diff --git a/src/bin/e_moveresize.c b/src/bin/e_moveresize.c index 7d7134160..f27c75cc3 100644 --- a/src/bin/e_moveresize.c +++ b/src/bin/e_moveresize.c @@ -74,7 +74,7 @@ _e_resize_begin(void *data __UNUSED__, void *border) _disp_pop = e_popup_new(bd->zone, 0, 0, 1, 1); if (!_disp_pop) return; - e_popup_layer_set(_disp_pop, 255); + e_popup_layer_set(_disp_pop, E_LAYER_POPUP); _obj = edje_object_add(_disp_pop->evas); e_theme_edje_object_set(_obj, "base/theme/borders", "e/widgets/border/default/resize"); diff --git a/src/bin/e_popup.c b/src/bin/e_popup.c index 588a6d2ea..89b51d14d 100644 --- a/src/bin/e_popup.c +++ b/src/bin/e_popup.c @@ -48,7 +48,7 @@ e_popup_new(E_Zone *zone, int x, int y, int w, int h) pop->y = y; pop->w = w; pop->h = h; - pop->layer = e_desklock_state_get() ? 200 : 250; + pop->layer = E_LAYER_POPUP; pop->ecore_evas = e_canvas_new(pop->zone->container->win, pop->zone->x + pop->x, pop->zone->y + pop->y, pop->w, pop->h, 1, 1, &(pop->evas_win)); @@ -219,7 +219,7 @@ e_popup_edje_bg_object_set(E_Popup *pop, Evas_Object *o) } EAPI void -e_popup_layer_set(E_Popup *pop, int layer) +e_popup_layer_set(E_Popup *pop, E_Layer layer) { E_OBJECT_CHECK(pop); E_OBJECT_TYPE_CHECK(pop, E_POPUP_TYPE); diff --git a/src/bin/e_popup.h b/src/bin/e_popup.h index b27181d31..3a389a73a 100644 --- a/src/bin/e_popup.h +++ b/src/bin/e_popup.h @@ -13,7 +13,7 @@ struct _E_Popup E_Object e_obj_inherit; int x, y, w, h, zx, zy; - int layer; + E_Layer layer; unsigned char visible : 1; unsigned char shaped : 1; unsigned char need_shape_export : 1; @@ -41,7 +41,7 @@ EAPI void e_popup_resize(E_Popup *pop, int w, int h); EAPI void e_popup_move_resize(E_Popup *pop, int x, int y, int w, int h); EAPI void e_popup_ignore_events_set(E_Popup *pop, int ignore); EAPI void e_popup_edje_bg_object_set(E_Popup *pop, Evas_Object *o); -EAPI void e_popup_layer_set(E_Popup *pop, int layer); +EAPI void e_popup_layer_set(E_Popup *pop, E_Layer layer); EAPI void e_popup_idler_before(void); EAPI E_Popup *e_popup_find_by_window(Ecore_X_Window win); diff --git a/src/bin/e_remember.c b/src/bin/e_remember.c index c85e1a69b..d295db0a1 100644 --- a/src/bin/e_remember.c +++ b/src/bin/e_remember.c @@ -803,12 +803,7 @@ _e_remember_cb_hook_pre_post_fetch(void *data __UNUSED__, void *border) } if (rem->apply & E_REMEMBER_APPLY_LAYER) { - bd->layer = rem->prop.layer; - if (bd->layer == 100) - e_hints_window_stacking_set(bd, E_STACKING_NONE); - else if (bd->layer == 150) - e_hints_window_stacking_set(bd, E_STACKING_ABOVE); - e_container_border_raise(bd); + e_border_layer_set(bd, rem->prop.layer); } if (rem->apply & E_REMEMBER_APPLY_BORDER) { diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index a6c442849..4d7ae8c8e 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -190,7 +190,7 @@ e_shelf_zone_dummy_new(E_Zone *zone, Evas_Object *obj, int id) } EAPI E_Shelf * -e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, int layer, int id) +e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, E_Layer layer, int id) { E_Shelf *es; char buf[1024]; @@ -550,7 +550,7 @@ e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int h) } EAPI void -e_shelf_layer_set(E_Shelf *es, int layer) +e_shelf_layer_set(E_Shelf *es, E_Layer layer) { E_OBJECT_CHECK(es); E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE); diff --git a/src/bin/e_shelf.h b/src/bin/e_shelf.h index 2c69e6bd3..2d7b9b041 100644 --- a/src/bin/e_shelf.h +++ b/src/bin/e_shelf.h @@ -14,7 +14,7 @@ struct _E_Shelf E_Object e_obj_inherit; int id; int x, y, w, h; - int layer; + E_Layer layer; E_Popup *popup; /* NULL if its within an existing canvas */ E_Zone *zone; Evas_Object *o_base; @@ -68,7 +68,7 @@ EAPI void e_shelf_config_update(void); EAPI E_Entry_Dialog *e_shelf_new_dialog(E_Zone *zone); EAPI Eina_List *e_shelf_list(void); EAPI Eina_List *e_shelf_list_all(void); // includes dummy shelves -EAPI E_Shelf *e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, int layer, int id); +EAPI E_Shelf *e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, E_Layer layer, int id); EAPI E_Shelf *e_shelf_zone_dummy_new(E_Zone *zone, Evas_Object *obj, int id); EAPI void e_shelf_zone_move_resize_handle(E_Zone *zone); EAPI void e_shelf_populate(E_Shelf *es); @@ -80,7 +80,7 @@ EAPI void e_shelf_urgent_show(E_Shelf *es); EAPI void e_shelf_move(E_Shelf *es, int x, int y); EAPI void e_shelf_resize(E_Shelf *es, int w, int h); EAPI void e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int h); -EAPI void e_shelf_layer_set(E_Shelf *es, int layer); +EAPI void e_shelf_layer_set(E_Shelf *es, E_Layer layer); EAPI void e_shelf_save(E_Shelf *es); EAPI void e_shelf_unsave(E_Shelf *es); EAPI void e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient); diff --git a/src/bin/e_win.c b/src/bin/e_win.c index ec69c6260..717cc0749 100644 --- a/src/bin/e_win.c +++ b/src/bin/e_win.c @@ -434,7 +434,7 @@ e_win_borderless_set(E_Win *win, int borderless) } EAPI void -e_win_layer_set(E_Win *win, int layer) +e_win_layer_set(E_Win *win, E_Win_Layer layer) { E_OBJECT_CHECK(win); E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); diff --git a/src/bin/e_win.h b/src/bin/e_win.h index c5ab63bed..8a4f802c1 100644 --- a/src/bin/e_win.h +++ b/src/bin/e_win.h @@ -1,5 +1,12 @@ #ifdef E_TYPEDEFS +typedef enum _E_Win_Layer +{ + E_WIN_LAYER_BELOW = 3, + E_WIN_LAYER_NORMAL = 4, + E_WIN_LAYER_ABOVE = 5 +} E_Win_Layer; + typedef struct _E_Win E_Win; #else @@ -51,7 +58,7 @@ EAPI Evas *e_win_evas_get (E_Win *win); EAPI void e_win_shaped_set (E_Win *win, int shaped); EAPI void e_win_avoid_damage_set (E_Win *win, int avoid); EAPI void e_win_borderless_set (E_Win *win, int borderless); -EAPI void e_win_layer_set (E_Win *win, int layer); +EAPI void e_win_layer_set (E_Win *win, E_Win_Layer layer); EAPI void e_win_sticky_set (E_Win *win, int sticky); EAPI void e_win_move_callback_set (E_Win *win, void (*func) (E_Win *win)); EAPI void e_win_resize_callback_set(E_Win *win, void (*func) (E_Win *win)); diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 3bdbdcfe0..be953d330 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -391,7 +391,7 @@ e_zone_fullscreen_set(E_Zone *zone, { _e_zone_black_get(zone); ecore_evas_show(zone->black_ecore_evas); - e_container_window_raise(zone->container, zone->black_win, 150); + e_container_window_raise(zone->container, zone->black_win, E_LAYER_POPUP); zone->fullscreen = 1; } else if ((zone->fullscreen) && (!on)) @@ -1125,9 +1125,9 @@ e_zone_edge_new(E_Zone_Edge edge) break; } if (e_config->fullscreen_flip) - e_zone_edge_win_layer_set(zone, 350); + e_zone_edge_win_layer_set(zone, E_LAYER_TOP); else - e_zone_edge_win_layer_set(zone, 200); + e_zone_edge_win_layer_set(zone, E_LAYER_EDGE); } } } @@ -1207,8 +1207,8 @@ e_zone_edge_free(E_Zone_Edge edge) } EAPI void -e_zone_edge_win_layer_set(E_Zone *zone, - int layer) +e_zone_edge_win_layer_set(E_Zone *zone, + E_Layer layer) { if (zone->corner.left_bottom) e_container_window_raise(zone->container, zone->corner.left_bottom, layer); if (zone->corner.left_top) e_container_window_raise(zone->container, zone->corner.left_top, layer); diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h index 62e0437d1..70da4d3c8 100644 --- a/src/bin/e_zone.h +++ b/src/bin/e_zone.h @@ -152,7 +152,7 @@ EAPI void e_zone_edge_enable(void); EAPI void e_zone_edge_disable(void); EAPI void e_zone_edges_desk_flip_capable(E_Zone *zone, Eina_Bool l, Eina_Bool r, Eina_Bool t, Eina_Bool b); EAPI Eina_Bool e_zone_exists_direction(E_Zone *zone, E_Zone_Edge edge); -EAPI void e_zone_edge_win_layer_set(E_Zone *zone, int layer); +EAPI void e_zone_edge_win_layer_set(E_Zone *zone, E_Layer layer); EAPI void e_zone_useful_geometry_dirty(E_Zone *zone); EAPI void e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h); diff --git a/src/modules/conf_display/e_int_config_display.c b/src/modules/conf_display/e_int_config_display.c index 6c03563ba..06baf7a60 100644 --- a/src/modules/conf_display/e_int_config_display.c +++ b/src/modules/conf_display/e_int_config_display.c @@ -197,7 +197,7 @@ _surebox_new(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) e_dialog_button_focus_num(sb->dia, 1); e_win_centered_set(sb->dia->win, 1); e_win_borderless_set(sb->dia->win, 1); - e_win_layer_set(sb->dia->win, 6); + e_win_layer_set(sb->dia->win, E_WIN_LAYER_ABOVE); e_win_sticky_set(sb->dia->win, 1); e_dialog_show(sb->dia); e_object_ref(E_OBJECT(cfd)); diff --git a/src/modules/conf_edgebindings/e_int_config_edgebindings.c b/src/modules/conf_edgebindings/e_int_config_edgebindings.c index 8b38f7598..befd34e3f 100644 --- a/src/modules/conf_edgebindings/e_int_config_edgebindings.c +++ b/src/modules/conf_edgebindings/e_int_config_edgebindings.c @@ -190,7 +190,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) E_Container *con; E_Zone *zone; E_Config_Binding_Edge *bi, *bi2; - int layer; + E_Layer layer; _auto_apply_changes(cfdata); @@ -225,9 +225,9 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) if (cfdata->fullscreen_flip != e_config->fullscreen_flip) { if (cfdata->fullscreen_flip) - layer = 350; + layer = E_LAYER_TOP; else - layer = 200; + layer = E_LAYER_EDGE; EINA_LIST_FOREACH(e_manager_list(), l, man) { diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c index 3e170ada1..aefedde77 100644 --- a/src/modules/everything/evry.c +++ b/src/modules/everything/evry.c @@ -165,7 +165,7 @@ evry_show(E_Zone *zone, E_Zone_Edge edge, const char *params, Eina_Bool popup) if (popup) { - e_win_layer_set(win->ewin, 350); + e_win_layer_set(win->ewin, E_WIN_LAYER_ABOVE); ecore_x_netwm_window_type_set(win->ewin->evas_win, ECORE_X_WINDOW_TYPE_UTILITY); diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c index 0ea3affc5..905fa0d16 100644 --- a/src/modules/gadman/e_mod_gadman.c +++ b/src/modules/gadman/e_mod_gadman.c @@ -754,7 +754,7 @@ _gadman_gadcon_new(const char *name, Gadman_Layer_Type layer, E_Zone *zone, E_Ga ecore_evas_shaped_set(Man->top_ee, 1); e_canvas_add(Man->top_ee); //?? - e_container_window_raise(Man->container, Man->top_win, 250); + e_container_window_raise(Man->container, Man->top_win, E_LAYER_POPUP); ecore_evas_move_resize(Man->top_ee, 0, 0, Man->width, Man->height); ecore_evas_hide(Man->top_ee); diff --git a/src/modules/notification/e_mod_popup.c b/src/modules/notification/e_mod_popup.c index ef9af2714..3d96a5d3f 100644 --- a/src/modules/notification/e_mod_popup.c +++ b/src/modules/notification/e_mod_popup.c @@ -316,7 +316,7 @@ _notification_popup_new(E_Notification *n) _notification_popup_refresh(popup); next_pos = _notification_popup_place(popup, next_pos); e_popup_show(popup->win); - e_popup_layer_set(popup->win, 999); + e_popup_layer_set(popup->win, E_LAYER_POPUP); popups_displayed++; return popup; diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c index a9c249c4b..ef4a49879 100644 --- a/src/modules/pager/e_mod_main.c +++ b/src/modules/pager/e_mod_main.c @@ -770,7 +770,7 @@ _pager_popup_new(E_Zone *zone, int keyaction) E_FREE(pp); return NULL; } - e_popup_layer_set(pp->popup, 350); + e_popup_layer_set(pp->popup, E_LAYER_POPUP); pp->pager = _pager_new(pp->popup->evas, zone, NULL); pp->pager->popup = pp; diff --git a/src/modules/syscon/e_syscon.c b/src/modules/syscon/e_syscon.c index 520d52532..01b01f57b 100644 --- a/src/modules/syscon/e_syscon.c +++ b/src/modules/syscon/e_syscon.c @@ -97,7 +97,7 @@ e_syscon_show(E_Zone *zone, const char *defact) return 0; } evas_event_freeze(popup->evas); - e_popup_layer_set(popup, 500); + e_popup_layer_set(popup, E_LAYER_POPUP); handlers = eina_list_append (handlers, ecore_event_handler_add diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index 567cbbb87..2baf4c8c1 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -4,7 +4,6 @@ #define TILING_OVERLAY_TIMEOUT 5.0 #define TILING_RESIZE_STEP 5 -#define TILING_POPUP_LAYER 101 #define TILING_WRAP_SPEED 0.1 typedef enum { @@ -378,7 +377,6 @@ _restore_border(E_Border *bd) extra->orig.geom.w, extra->orig.geom.h); e_border_layer_set(bd, extra->orig.layer); - e_hints_window_stacking_set(bd, extra->orig.stacking); if (extra->orig.maximized) { e_border_maximize(bd, extra->orig.maximized); bd->maximized = extra->orig.maximized; @@ -629,7 +627,7 @@ _do_overlay(E_Border *focused_bd, if (!extra->overlay.popup) continue; - e_popup_layer_set(extra->overlay.popup, TILING_POPUP_LAYER); + e_popup_layer_set(extra->overlay.popup, E_LAYER_NORMAL); extra->overlay.obj = edje_object_add(extra->overlay.popup->evas); e_theme_edje_object_set(extra->overlay.obj, @@ -1243,8 +1241,7 @@ _add_border(E_Border *bd) extra = _get_or_create_border_extra(bd); /* Stack tiled window below so that winlist doesn't mix up stacking */ - e_border_layer_set(bd, 75); - e_hints_window_stacking_set(bd, E_STACKING_BELOW); + e_border_layer_set(bd, E_LAYER_BELOW); DBG("adding %p", bd); @@ -1807,7 +1804,7 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack) if (!overlay->popup) return; - e_popup_layer_set(overlay->popup, TILING_POPUP_LAYER); + e_popup_layer_set(overlay->popup, E_LAYER_NORMAL); overlay->obj = edje_object_add(overlay->popup->evas); _theme_edje_object_set(overlay->obj, "modules/tiling/move/left"); @@ -1859,7 +1856,7 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack) if (!overlay->popup) return; - e_popup_layer_set(overlay->popup, TILING_POPUP_LAYER); + e_popup_layer_set(overlay->popup, E_LAYER_NORMAL); overlay->obj = edje_object_add(overlay->popup->evas); _theme_edje_object_set(overlay->obj, "modules/tiling/move/right"); @@ -1908,7 +1905,7 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack) if (!overlay->popup) return; - e_popup_layer_set(overlay->popup, TILING_POPUP_LAYER); + e_popup_layer_set(overlay->popup, E_LAYER_NORMAL); overlay->obj = edje_object_add(overlay->popup->evas); _theme_edje_object_set(overlay->obj, "modules/tiling/move/up"); edje_object_size_min_calc(overlay->obj, &ew, &eh); @@ -1959,7 +1956,7 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack) if (!overlay->popup) return; - e_popup_layer_set(overlay->popup, TILING_POPUP_LAYER); + e_popup_layer_set(overlay->popup, E_LAYER_NORMAL); overlay->obj = edje_object_add(overlay->popup->evas); _theme_edje_object_set(overlay->obj, "modules/tiling/move/down"); @@ -2986,7 +2983,7 @@ _transition_overlay_key_down(void *data __UNUSED__, if (!trov->overlay.popup) { trov->overlay.popup = e_popup_new(_G.tinfo->desk->zone, 0, 0, 1, 1); - e_popup_layer_set(trov->overlay.popup, TILING_POPUP_LAYER); + e_popup_layer_set(trov->overlay.popup, E_LAYER_NORMAL); } if (!trov->overlay.obj) { trov->overlay.obj = @@ -3108,7 +3105,7 @@ _do_transition_overlay(void) if (!trov->overlay.popup) continue; - e_popup_layer_set(trov->overlay.popup, TILING_POPUP_LAYER); + e_popup_layer_set(trov->overlay.popup, E_LAYER_NORMAL); trov->overlay.obj = edje_object_add(trov->overlay.popup->evas); e_theme_edje_object_set(trov->overlay.obj, "base/theme/borders", @@ -3179,7 +3176,7 @@ _do_transition_overlay(void) if (!trov->overlay.popup) continue; - e_popup_layer_set(trov->overlay.popup, TILING_POPUP_LAYER); + e_popup_layer_set(trov->overlay.popup, E_LAYER_NORMAL); trov->overlay.obj = edje_object_add(trov->overlay.popup->evas); e_theme_edje_object_set(trov->overlay.obj, "base/theme/borders", diff --git a/src/modules/winlist/e_winlist.c b/src/modules/winlist/e_winlist.c index 434178803..a9492e59d 100644 --- a/src/modules/winlist/e_winlist.c +++ b/src/modules/winlist/e_winlist.c @@ -150,7 +150,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter) evas_event_feed_mouse_move(_winlist->evas, -1000000, -1000000, ecore_x_current_time_get(), NULL); - e_popup_layer_set(_winlist, 350); + e_popup_layer_set(_winlist, E_LAYER_POPUP); evas_event_freeze(_winlist->evas); o = edje_object_add(_winlist->evas); _bg_object = o; diff --git a/src/modules/wizard/e_wizard.c b/src/modules/wizard/e_wizard.c index 972a7ddc4..59afbf4e6 100644 --- a/src/modules/wizard/e_wizard.c +++ b/src/modules/wizard/e_wizard.c @@ -247,7 +247,7 @@ _e_wizard_main_new(E_Zone *zone) Eina_Bool kg; popup = e_popup_new(zone, 0, 0, zone->w, zone->h); - e_popup_layer_set(popup, 350); + e_popup_layer_set(popup, E_LAYER_TOP); o = edje_object_add(popup->evas); e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/main"); @@ -301,7 +301,7 @@ _e_wizard_extra_new(E_Zone *zone) Evas_Object *o; popup = e_popup_new(zone, 0, 0, zone->w, zone->h); - e_popup_layer_set(popup, 350); + e_popup_layer_set(popup, E_LAYER_TOP); o = edje_object_add(popup->evas); e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/extra"); evas_object_move(o, 0, 0);