forked from enlightenment/enlightenment
* Add missing prototypes.
* Store client_leader info. * Honour modal windows for group. SVN revision: 16464
This commit is contained in:
parent
25d9b5bba7
commit
aa2bb0d2b3
|
@ -537,7 +537,7 @@ e_border_desk_set(E_Border *bd, E_Desk *desk)
|
||||||
if (e_config->transient.desktop)
|
if (e_config->transient.desktop)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
for (l = bd->children; l; l = l->next)
|
for (l = bd->transients; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
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
|
/* We need to set raise to one, else the child wont
|
||||||
* follow to the new layer. It should be like this,
|
* follow to the new layer. It should be like this,
|
||||||
* even if the user usually doesn't want to raise
|
* even if the user usually doesn't want to raise
|
||||||
* the children.
|
* the transients.
|
||||||
*/
|
*/
|
||||||
e_config->transient.raise = 1;
|
e_config->transient.raise = 1;
|
||||||
for (l = bd->children; l; l = l->next)
|
for (l = bd->transients; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
E_Border *child;
|
||||||
|
|
||||||
|
@ -861,12 +861,12 @@ e_border_raise(E_Border *bd)
|
||||||
if (e_config->transient.raise)
|
if (e_config->transient.raise)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
for (l = bd->children; l; l = l->next)
|
for (l = bd->transients; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
E_Border *child;
|
||||||
|
|
||||||
child = l->data;
|
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.
|
* thats another option.
|
||||||
*/
|
*/
|
||||||
if (!child->iconic)
|
if (!child->iconic)
|
||||||
|
@ -907,7 +907,7 @@ e_border_lower(E_Border *bd)
|
||||||
if (e_config->transient.lower)
|
if (e_config->transient.lower)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
for (l = bd->children; l; l = l->next)
|
for (l = bd->transients; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
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);
|
e_border_focus_set(bd->modal, focus, set);
|
||||||
return;
|
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->visible) && (bd->changes.visible))
|
||||||
{
|
{
|
||||||
if ((bd->want_focus) && (set) && (!focus))
|
if ((bd->want_focus) && (set) && (!focus))
|
||||||
|
@ -1562,7 +1567,7 @@ e_border_iconify(E_Border *bd)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
|
||||||
for (l = bd->children; l; l = l->next)
|
for (l = bd->transients; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
E_Border *child;
|
||||||
|
|
||||||
|
@ -1603,7 +1608,7 @@ e_border_uniconify(E_Border *bd)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
|
||||||
for (l = bd->children; l; l = l->next)
|
for (l = bd->transients; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
E_Border *child;
|
||||||
|
|
||||||
|
@ -2317,7 +2322,7 @@ _e_border_del(E_Border *bd)
|
||||||
|
|
||||||
if (bd->parent)
|
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)
|
if (bd->parent->modal == bd)
|
||||||
{
|
{
|
||||||
bd->parent->modal = NULL;
|
bd->parent->modal = NULL;
|
||||||
|
@ -2325,13 +2330,32 @@ _e_border_del(E_Border *bd)
|
||||||
e_border_focus_set(bd->parent, 1, 1);
|
e_border_focus_set(bd->parent, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (bd->children)
|
while (bd->transients)
|
||||||
{
|
{
|
||||||
E_Border *child;
|
E_Border *child;
|
||||||
|
|
||||||
child = bd->children->data;
|
child = bd->transients->data;
|
||||||
child->parent = NULL;
|
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)
|
if (bd->new_client)
|
||||||
{
|
{
|
||||||
bd->new_client = 0;
|
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)
|
if (bd->client.icccm.transient_for)
|
||||||
{
|
{
|
||||||
E_Border *bd_parent;
|
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);
|
bd_parent = e_border_find_by_client_window(bd->client.icccm.transient_for);
|
||||||
if (bd_parent)
|
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;
|
bd->parent = bd_parent;
|
||||||
if (bd->client.netwm.state.modal)
|
if (bd->client.netwm.state.modal)
|
||||||
bd->parent->modal = bd;
|
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);
|
// printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
|
||||||
if (bd->re_manage)
|
if (bd->re_manage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -385,9 +385,13 @@ struct _E_Border
|
||||||
Ecore_X_Rectangle *shape_rects;
|
Ecore_X_Rectangle *shape_rects;
|
||||||
E_Remember *remember;
|
E_Remember *remember;
|
||||||
|
|
||||||
E_Border *parent;
|
|
||||||
E_Border *modal;
|
E_Border *modal;
|
||||||
Evas_List *children;
|
|
||||||
|
E_Border *leader;
|
||||||
|
Evas_List *group;
|
||||||
|
|
||||||
|
E_Border *parent;
|
||||||
|
Evas_List *transients;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Border_Pending_Move_Resize
|
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 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_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);
|
EAPI void e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev);
|
||||||
|
|
|
@ -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 void e_theme_config_set(const char *category, const char *file);
|
||||||
EAPI E_Config_Theme *e_theme_config_get(const char *category);
|
EAPI E_Config_Theme *e_theme_config_get(const char *category);
|
||||||
EAPI void e_theme_config_remove(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);
|
EAPI Evas_List *e_theme_config_list(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -71,6 +71,7 @@ struct _E_Event_Pointer_Warp
|
||||||
EAPI int e_zone_init(void);
|
EAPI int e_zone_init(void);
|
||||||
EAPI int e_zone_shutdown(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 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_move(E_Zone *zone, int x, int y);
|
||||||
EAPI void e_zone_resize(E_Zone *zone, int w, int h);
|
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);
|
EAPI void e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h);
|
||||||
|
|
Loading…
Reference in New Issue