diff --git a/src/bin/e_border.c b/src/bin/e_border.c index b8bdf6832..0b218481d 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -537,7 +537,7 @@ e_border_desk_set(E_Border *bd, E_Desk *desk) if (e_config->transient.desktop) { Evas_List *l; - for (l = bd->children; l; l = l->next) + for (l = bd->transients; l; l = l->next) { E_Border *child; @@ -813,10 +813,10 @@ e_border_layer_set(E_Border *bd, int layer) /* We need to set raise to one, else the child wont * follow to the new layer. It should be like this, * even if the user usually doesn't want to raise - * the children. + * the transients. */ e_config->transient.raise = 1; - for (l = bd->children; l; l = l->next) + for (l = bd->transients; l; l = l->next) { E_Border *child; @@ -861,12 +861,12 @@ e_border_raise(E_Border *bd) if (e_config->transient.raise) { Evas_List *l; - for (l = bd->children; l; l = l->next) + for (l = bd->transients; l; l = l->next) { E_Border *child; child = l->data; - /* Don't raise iconic children. If the user wants these shown, + /* Don't raise iconic transients. If the user wants these shown, * thats another option. */ if (!child->iconic) @@ -907,7 +907,7 @@ e_border_lower(E_Border *bd) if (e_config->transient.lower) { Evas_List *l; - for (l = bd->children; l; l = l->next) + for (l = bd->transients; l; l = l->next) { E_Border *child; @@ -978,6 +978,11 @@ e_border_focus_set(E_Border *bd, int focus, int set) e_border_focus_set(bd->modal, focus, set); return; } + else if ((bd->leader) && (bd->leader->modal)) + { + e_border_focus_set(bd->leader->modal, focus, set); + return; + } if ((bd->visible) && (bd->changes.visible)) { if ((bd->want_focus) && (set) && (!focus)) @@ -1562,7 +1567,7 @@ e_border_iconify(E_Border *bd) { Evas_List *l; - for (l = bd->children; l; l = l->next) + for (l = bd->transients; l; l = l->next) { E_Border *child; @@ -1603,7 +1608,7 @@ e_border_uniconify(E_Border *bd) { Evas_List *l; - for (l = bd->children; l; l = l->next) + for (l = bd->transients; l; l = l->next) { E_Border *child; @@ -2317,7 +2322,7 @@ _e_border_del(E_Border *bd) if (bd->parent) { - bd->parent->children = evas_list_remove(bd->parent->children, bd); + bd->parent->transients = evas_list_remove(bd->parent->transients, bd); if (bd->parent->modal == bd) { bd->parent->modal = NULL; @@ -2325,13 +2330,32 @@ _e_border_del(E_Border *bd) e_border_focus_set(bd->parent, 1, 1); } } - while (bd->children) + while (bd->transients) { E_Border *child; - child = bd->children->data; + child = bd->transients->data; child->parent = NULL; - bd->children = evas_list_remove_list(bd->children, bd->children); + bd->transients = evas_list_remove_list(bd->transients, bd->transients); + } + + if (bd->leader) + { + bd->leader->group = evas_list_remove(bd->leader->group, bd); + if (bd->leader->modal == bd) + { + bd->leader->modal = NULL; + if (bd->focused) + e_border_focus_set(bd->leader, 1, 1); + } + } + while (bd->group) + { + E_Border *child; + + child = bd->group->data; + child->leader = NULL; + bd->group = evas_list_remove_list(bd->group, bd->group); } } @@ -4719,6 +4743,12 @@ _e_border_eval(E_Border *bd) if (bd->new_client) { bd->new_client = 0; + if ((bd->client.icccm.transient_for) && (bd->client.icccm.client_leader)) + { + e_error_dialog_show(_("ICCCM error"), + _("Weird, this window is transient and has a leader: %s\n", + e_border_name_get(bd))); + } if (bd->client.icccm.transient_for) { E_Border *bd_parent; @@ -4726,12 +4756,25 @@ _e_border_eval(E_Border *bd) bd_parent = e_border_find_by_client_window(bd->client.icccm.transient_for); if (bd_parent) { - bd_parent->children = evas_list_append(bd_parent->children, bd); + bd_parent->transients = evas_list_append(bd_parent->transients, bd); bd->parent = bd_parent; if (bd->client.netwm.state.modal) bd->parent->modal = bd; } } + if (bd->client.icccm.client_leader) + { + E_Border *bd_leader; + + bd_leader = e_border_find_by_client_window(bd->client.icccm.client_leader); + if (bd_leader) + { + bd_leader->group = evas_list_append(bd_leader->group, bd); + bd->leader = bd_leader; + if (bd->client.netwm.state.modal) + bd->leader->modal = bd; + } + } // printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win); if (bd->re_manage) { diff --git a/src/bin/e_border.h b/src/bin/e_border.h index b951a4ea4..9425e28c2 100644 --- a/src/bin/e_border.h +++ b/src/bin/e_border.h @@ -385,9 +385,13 @@ struct _E_Border Ecore_X_Rectangle *shape_rects; E_Remember *remember; - E_Border *parent; E_Border *modal; - Evas_List *children; + + E_Border *leader; + Evas_List *group; + + E_Border *parent; + Evas_List *transients; }; struct _E_Border_Pending_Move_Resize @@ -515,7 +519,7 @@ EAPI E_Border *e_border_focused_get(void); EAPI void e_border_idler_before(void); -EAPI Evas_List *e_border_clients_get(); +EAPI Evas_List *e_border_clients_get(void); EAPI void e_border_act_move_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev); EAPI void e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev); diff --git a/src/bin/e_theme.h b/src/bin/e_theme.h index a865fa104..08db9f37e 100644 --- a/src/bin/e_theme.h +++ b/src/bin/e_theme.h @@ -16,6 +16,7 @@ EAPI void e_theme_file_set(char *category, char *file); EAPI void e_theme_config_set(const char *category, const char *file); EAPI E_Config_Theme *e_theme_config_get(const char *category); EAPI void e_theme_config_remove(const char *category); +EAPI void e_theme_about(E_Zone *zone, const char *file); EAPI Evas_List *e_theme_config_list(void); #endif diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h index c8f1ed481..e05cc01c1 100644 --- a/src/bin/e_zone.h +++ b/src/bin/e_zone.h @@ -71,6 +71,7 @@ struct _E_Event_Pointer_Warp EAPI int e_zone_init(void); EAPI int e_zone_shutdown(void); EAPI E_Zone *e_zone_new(E_Container *con, int num, int x, int y, int w, int h); +EAPI void e_zone_name_set(E_Zone *zone, const char *name); EAPI void e_zone_move(E_Zone *zone, int x, int y); EAPI void e_zone_resize(E_Zone *zone, int w, int h); EAPI void e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h);