Add meta_window_is_mapped, remove usage of window-private.h from mutter-window.c

mutter-window.c originally grew an #include "window-private.h" for
window->override_redirect, but that was just fixed.  However since
then it also ended up relying on a few other minor private bits.

To fix that, add meta_window_is_mapped, promote meta_window_toplevel_is_mapped
to public, and use the public MetaDisplay accessor.
This commit is contained in:
Colin Walters
2009-08-14 06:18:28 -04:00
parent e960269653
commit 41cf9134a6
4 changed files with 17 additions and 6 deletions

View File

@ -456,8 +456,6 @@ void meta_window_resize_with_gravity (MetaWindow *window,
/* Return whether the window should be currently mapped */
gboolean meta_window_should_be_showing (MetaWindow *window);
gboolean meta_window_toplevel_is_mapped (MetaWindow *window);
/* See warning in window.c about this function */
gboolean __window_is_terminal (MetaWindow *window);

View File

@ -2321,6 +2321,18 @@ unmap_client_window (MetaWindow *window,
return FALSE;
}
/**
* meta_window_is_mapped:
* @window: a #MetaWindow
*
* Determines whether the X window for the MetaWindow is mapped.
*/
gboolean
meta_window_is_mapped (MetaWindow *window)
{
return window->mapped;
}
/**
* meta_window_toplevel_is_mapped:
* @window: a #MetaWindow