mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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
This commit is contained in:
parent
47f67eb270
commit
e7e41b045d
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
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
|
||||
|
31
src/stack.c
31
src/stack.c
@ -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;
|
||||
|
||||
if (w->xtransient_for != None)
|
||||
group = meta_window_get_group (w);
|
||||
|
||||
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;
|
||||
|
||||
|
22
src/window.c
22
src/window.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user