warn and ignore if transient_for is set to a non-top-level window. Fixes

2006-04-19  Thomas Andersen  <phomes@gmail.com>

        * src/window-props.c (reload_transient_for): warn and ignore if
	transient_for is set to a non-top-level window.  Fixes #335524.
This commit is contained in:
Thomas Andersen 2006-04-19 20:55:49 +00:00 committed by Elijah Newren
parent c118c50117
commit 14f120f131
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-04-19 Thomas Andersen <phomes@gmail.com>
* src/window-props.c (reload_transient_for): warn and ignore if
transient_for is set to a non-top-level window. Fixes #335524.
2006-04-19 Björn Lindqvist <bjourne@gmail.com> 2006-04-19 Björn Lindqvist <bjourne@gmail.com>
* src/frames.c (struct CachedPixels, meta_frames_destroy, * src/frames.c (struct CachedPixels, meta_frames_destroy,

View File

@ -1130,6 +1130,17 @@ reload_transient_for (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID) if (value->type != META_PROP_VALUE_INVALID)
window->xtransient_for = value->v.xwindow; window->xtransient_for = value->v.xwindow;
/* Make sure transient_for is valid */
if (window->xtransient_for != None &&
meta_display_lookup_x_window (window->display,
window->xtransient_for) == NULL)
{
window->xtransient_for = None;
meta_warning (_("Invalid WM_TRANSIENT_FOR window 0x%lx specified "
"for %s.\n"),
window->xtransient_for, window->desc);
}
window->transient_parent_is_root_window = window->transient_parent_is_root_window =
window->xtransient_for == window->screen->xroot; window->xtransient_for == window->screen->xroot;