Commit e7e41b04 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington
Browse files

keep a flag transient_parent_is_root_window for whether the

2002-09-27  Havoc Pennington  <hp@redhat.com>

	* src/window.c (update_transient_for): keep a flag
	transient_parent_is_root_window for whether the
	root-window-as-parent convention was used.

2002-09-25  Arvind Samptur <arvind.samptur@wipro.com>

 	* src/stack.c (sort_window_list): Keep dialogs without
 	transient parent above entire app. Fixes #88926
parent 47f67eb2
2002-09-27 Havoc Pennington <hp@redhat.com>
* src/window.c (update_transient_for): keep a flag
transient_parent_is_root_window for whether the
root-window-as-parent convention was used.
2002-09-25 Arvind Samptur <arvind.samptur@wipro.com>
* src/stack.c (sort_window_list): Keep dialogs without
transient parent above entire app. Fixes #88926
2002-09-26 Havoc Pennington <hp@pobox.com>
* src/menu.c (meta_window_menu_new): use MetaAccelLabel to display
......
......@@ -390,8 +390,37 @@ sort_window_list (GList *list)
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
if ((w->xtransient_for == None ||
w->transient_parent_is_root_window) &&
(w->type == META_WINDOW_DIALOG ||
w->type == META_WINDOW_MODAL_DIALOG))
{
GSList *group_windows;
GSList *tmp;
MetaGroup *group;
group = meta_window_get_group (w);
if (w->xtransient_for != None)
if (group != NULL)
group_windows = meta_group_list_windows (group);
else
group_windows = NULL;
tmp = group_windows;
while (tmp != NULL)
{
MetaWindow *group_window = tmp->data;
if (!(meta_window_is_ancestor_of_transient (w, group_window)))
list = ensure_before (list, w, group_window);
tmp = tmp->next;
}
}
else if (w->xtransient_for != None &&
!w->transient_parent_is_root_window)
{
MetaWindow *parent;
......
......@@ -401,6 +401,7 @@ meta_window_new (MetaDisplay *display, Window xwindow,
window->xtransient_for = None;
window->xgroup_leader = None;
window->xclient_leader = None;
window->transient_parent_is_root_window = FALSE;
window->type = META_WINDOW_NORMAL;
window->type_atom = None;
......@@ -1142,7 +1143,8 @@ meta_window_calc_showing (MetaWindow *window)
break;
}
if (w->xtransient_for == None)
if (w->xtransient_for == None ||
w->transient_parent_is_root_window)
break;
w = meta_display_lookup_x_window (w->display, w->xtransient_for);
......@@ -1822,7 +1824,8 @@ unminimize_window_and_all_transient_parents (MetaWindow *window)
{
meta_window_unminimize (w);
if (w->xtransient_for == None)
if (w->xtransient_for == None ||
w->transient_parent_is_root_window)
break;
w = meta_display_lookup_x_window (w->display, w->xtransient_for);
......@@ -4618,7 +4621,8 @@ update_sm_hints (MetaWindow *window)
if (leader != None)
break;
if (w->xtransient_for == None)
if (w->xtransient_for == None ||
w->transient_parent_is_root_window)
break;
w = meta_display_lookup_x_window (w->display, w->xtransient_for);
......@@ -4705,12 +4709,15 @@ update_transient_for (MetaWindow *window)
&w);
window->xtransient_for = w;
window->transient_parent_is_root_window =
window->xtransient_for == window->screen->xroot;
if (window->xtransient_for != None)
meta_verbose ("Window %s transient for 0x%lx\n", window->desc,
window->xtransient_for);
meta_verbose ("Window %s transient for 0x%lx (root = %d)\n", window->desc,
window->xtransient_for, window->transient_parent_is_root_window);
else
meta_verbose ("Window %s is not transient\n", window->desc);
/* may now be a dialog */
recalc_window_type (window);
......@@ -6478,7 +6485,8 @@ meta_window_is_ancestor_of_transient (MetaWindow *window,
w = transient;
while (w != NULL)
{
if (w->xtransient_for == None)
if (w->xtransient_for == None ||
w->transient_parent_is_root_window)
return FALSE;
if (w->xtransient_for == window->xwindow)
......
......@@ -204,6 +204,9 @@ struct _MetaWindow
guint has_struts : 1;
/* Struts are from the _WIN_HINTS do not cover deal */
guint do_not_cover : 1;
/* Transient parent is a root window */
guint transient_parent_is_root_window : 1;
/* Number of UnmapNotify that are caused by us, if
* we get UnmapNotify with none pending then the client
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment