From 781568dc46e0c816fc597830f34afafb85157030 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Sat, 5 Dec 2009 17:27:30 +0000 Subject: [PATCH] Add function to return valid borders. Focus any newly added borders. Remove any remaining layer_set(s). SVN revision: 44201 --- src/modules/illume2/e_mod_layout.c | 20 ++++++++++++++++++++ src/modules/illume2/e_mod_layout.h | 2 ++ src/modules/illume2/e_mod_layout_illume.c | 23 ++++++----------------- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/modules/illume2/e_mod_layout.c b/src/modules/illume2/e_mod_layout.c index 51488429c..30bbfaa03 100644 --- a/src/modules/illume2/e_mod_layout.c +++ b/src/modules/illume2/e_mod_layout.c @@ -338,6 +338,26 @@ illume_border_is_conformant(E_Border *bd) return ret; } +Eina_List * +illume_border_valid_borders_get(void) +{ + Eina_List *bds, *l, *ret = NULL; + E_Border *bd; + + bds = e_border_client_list(); + EINA_LIST_FOREACH(bds, l, bd) + { + if (!bd) continue; + if (illume_border_is_top_shelf(bd)) continue; + if (illume_border_is_bottom_panel(bd)) continue; + if (illume_border_is_keyboard(bd)) continue; + if (illume_border_is_dialog(bd)) continue; + if (strstr(bd->client.icccm.class, "config")) continue; + ret = eina_list_append(ret, bd); + } + return ret; +} + void illume_border_slide_to(E_Border *bd, int x, int y, Illume_Anim_Class aclass) { diff --git a/src/modules/illume2/e_mod_layout.h b/src/modules/illume2/e_mod_layout.h index d45bb1610..b32d3050c 100644 --- a/src/modules/illume2/e_mod_layout.h +++ b/src/modules/illume2/e_mod_layout.h @@ -52,6 +52,8 @@ Eina_Bool illume_border_is_side_pane_right(E_Border *bd); Eina_Bool illume_border_is_overlay(E_Border *bd); Eina_Bool illume_border_is_conformant(E_Border *bd); +Eina_List *illume_border_valid_borders_get(void); + void illume_border_slide_to(E_Border *bd, int x, int y, Illume_Anim_Class aclass); void illume_border_min_get(E_Border *bd, int *mw, int *mh); diff --git a/src/modules/illume2/e_mod_layout_illume.c b/src/modules/illume2/e_mod_layout_illume.c index 9492c6d2e..d32d0ab8d 100644 --- a/src/modules/illume2/e_mod_layout_illume.c +++ b/src/modules/illume2/e_mod_layout_illume.c @@ -16,7 +16,8 @@ static int panelsize = 0; static void _border_add(E_Border *bd) { // handle a border being added - + e_border_raise(bd); + e_border_focus_set(bd, 1, 1); } static void @@ -95,10 +96,8 @@ _zone_layout(E_Zone *z) } else if (illume_border_is_home(bd)) { - int x, y, w, h; - - _border_calc_position(z, bd, &x, &y, &w, &h); - e_border_move_resize(bd, x, y, w, h); + e_border_move_resize(bd, z->x, z->y + shelfsize, z->w, + z->h - shelfsize - panelsize); } else if (illume_border_is_dialog(bd)) { @@ -107,18 +106,8 @@ _zone_layout(E_Zone *z) } else { - int x, y, w, h; - - _border_calc_position(z, bd, &x, &y, &w, &h); - e_border_move_resize(bd, x, y, w, h); - if (illume_border_is_conformant(bd)) - { - if (bd->layer != 110) e_border_layer_set(bd, 110); - } - else - { - if (bd->layer != 100) e_border_layer_set(bd, 100); - } + e_border_move_resize(bd, z->x, z->y + shelfsize, z->w, + z->h - shelfsize - panelsize); } } }