mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
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:
parent
e960269653
commit
41cf9134a6
@ -10,7 +10,6 @@
|
||||
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
#include "../core/window-private.h" /* FIXME: add meta_window_is_override_redirect */
|
||||
#include "display.h"
|
||||
#include "errors.h"
|
||||
#include "frame.h"
|
||||
@ -844,7 +843,7 @@ mutter_window_after_effects (MutterWindow *self)
|
||||
mutter_window_sync_visibility (self);
|
||||
mutter_window_sync_actor_position (self);
|
||||
|
||||
if (!priv->window->mapped)
|
||||
if (!meta_window_is_mapped (priv->window))
|
||||
mutter_window_detach (self);
|
||||
|
||||
if (priv->needs_repair)
|
||||
@ -1183,7 +1182,7 @@ mutter_window_new (MetaWindow *window)
|
||||
|
||||
/* FIXME: Remove the redundant data we store in self->priv->attrs, and
|
||||
* simply query metacity core for the data. */
|
||||
if (!XGetWindowAttributes (display->xdisplay, top_window, &attrs))
|
||||
if (!XGetWindowAttributes (meta_display_get_xdisplay (display), top_window, &attrs))
|
||||
return NULL;
|
||||
|
||||
self = g_object_new (MUTTER_TYPE_COMP_WINDOW,
|
||||
@ -1633,7 +1632,7 @@ check_needs_reshape (MutterWindow *self)
|
||||
#ifdef HAVE_SHAPE
|
||||
if (priv->shaped)
|
||||
{
|
||||
Display *xdisplay = meta_display_get_xdisplay (priv->window->display);
|
||||
Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (priv->window));
|
||||
XRectangle *rects;
|
||||
int n_rects, ordering;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -103,6 +103,8 @@ MetaStackLayer meta_window_get_layer (MetaWindow *window);
|
||||
MetaWindow* meta_window_find_root_ancestor (MetaWindow *window);
|
||||
gboolean meta_window_is_ancestor_of_transient (MetaWindow *window,
|
||||
MetaWindow *transient);
|
||||
gboolean meta_window_is_mapped (MetaWindow *window);
|
||||
gboolean meta_window_toplevel_is_mapped (MetaWindow *window);
|
||||
gboolean meta_window_get_icon_geometry (MetaWindow *window,
|
||||
MetaRectangle *rect);
|
||||
void meta_window_maximize (MetaWindow *window,
|
||||
|
Loading…
Reference in New Issue
Block a user