mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 15:37:00 -05:00
window-actor: Remove (private) xwindow property
This should make it easier to construct a MetaWindowActor from bindings. https://bugzilla.gnome.org/show_bug.cgi?id=678989
This commit is contained in:
parent
3e179c07bc
commit
f8b4c28278
@ -46,7 +46,6 @@ static guint signals[LAST_SIGNAL] = {0};
|
|||||||
struct _MetaWindowActorPrivate
|
struct _MetaWindowActorPrivate
|
||||||
{
|
{
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
Window xwindow;
|
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
@ -156,7 +155,6 @@ enum
|
|||||||
{
|
{
|
||||||
PROP_META_WINDOW = 1,
|
PROP_META_WINDOW = 1,
|
||||||
PROP_META_SCREEN,
|
PROP_META_SCREEN,
|
||||||
PROP_X_WINDOW,
|
|
||||||
PROP_NO_SHADOW,
|
PROP_NO_SHADOW,
|
||||||
PROP_SHADOW_CLASS
|
PROP_SHADOW_CLASS
|
||||||
};
|
};
|
||||||
@ -240,18 +238,6 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
|||||||
PROP_META_SCREEN,
|
PROP_META_SCREEN,
|
||||||
pspec);
|
pspec);
|
||||||
|
|
||||||
pspec = g_param_spec_ulong ("x-window",
|
|
||||||
"Window",
|
|
||||||
"Window",
|
|
||||||
0,
|
|
||||||
G_MAXULONG,
|
|
||||||
0,
|
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_X_WINDOW,
|
|
||||||
pspec);
|
|
||||||
|
|
||||||
pspec = g_param_spec_boolean ("no-shadow",
|
pspec = g_param_spec_boolean ("no-shadow",
|
||||||
"No shadow",
|
"No shadow",
|
||||||
"Do not add shaddow to this window",
|
"Do not add shaddow to this window",
|
||||||
@ -352,10 +338,12 @@ meta_window_actor_constructed (GObject *object)
|
|||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
MetaScreen *screen = priv->screen;
|
MetaScreen *screen = priv->screen;
|
||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
Window xwindow = priv->xwindow;
|
|
||||||
MetaWindow *window = priv->window;
|
MetaWindow *window = priv->window;
|
||||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
XRenderPictFormat *format;
|
XRenderPictFormat *format;
|
||||||
|
Window xwindow;
|
||||||
|
|
||||||
|
xwindow = meta_window_get_toplevel_xwindow (window);
|
||||||
|
|
||||||
priv->damage = XDamageCreate (xdisplay, xwindow,
|
priv->damage = XDamageCreate (xdisplay, xwindow,
|
||||||
XDamageReportBoundingBox);
|
XDamageReportBoundingBox);
|
||||||
@ -485,9 +473,6 @@ meta_window_actor_set_property (GObject *object,
|
|||||||
case PROP_META_SCREEN:
|
case PROP_META_SCREEN:
|
||||||
priv->screen = g_value_get_pointer (value);
|
priv->screen = g_value_get_pointer (value);
|
||||||
break;
|
break;
|
||||||
case PROP_X_WINDOW:
|
|
||||||
priv->xwindow = g_value_get_ulong (value);
|
|
||||||
break;
|
|
||||||
case PROP_NO_SHADOW:
|
case PROP_NO_SHADOW:
|
||||||
{
|
{
|
||||||
gboolean newv = g_value_get_boolean (value);
|
gboolean newv = g_value_get_boolean (value);
|
||||||
@ -535,9 +520,6 @@ meta_window_actor_get_property (GObject *object,
|
|||||||
case PROP_META_SCREEN:
|
case PROP_META_SCREEN:
|
||||||
g_value_set_pointer (value, priv->screen);
|
g_value_set_pointer (value, priv->screen);
|
||||||
break;
|
break;
|
||||||
case PROP_X_WINDOW:
|
|
||||||
g_value_set_ulong (value, priv->xwindow);
|
|
||||||
break;
|
|
||||||
case PROP_NO_SHADOW:
|
case PROP_NO_SHADOW:
|
||||||
g_value_set_boolean (value, priv->no_shadow);
|
g_value_set_boolean (value, priv->no_shadow);
|
||||||
break;
|
break;
|
||||||
@ -805,20 +787,6 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* meta_window_actor_get_x_window: (skip)
|
|
||||||
* @self: a #MetaWindowActor
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
Window
|
|
||||||
meta_window_actor_get_x_window (MetaWindowActor *self)
|
|
||||||
{
|
|
||||||
if (!self)
|
|
||||||
return None;
|
|
||||||
|
|
||||||
return self->priv->xwindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_window_actor_get_meta_window:
|
* meta_window_actor_get_meta_window:
|
||||||
* @self: a #MetaWindowActor
|
* @self: a #MetaWindowActor
|
||||||
@ -1354,7 +1322,7 @@ meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
|||||||
MetaDisplay *display = meta_window_get_display (metaWindow);
|
MetaDisplay *display = meta_window_get_display (metaWindow);
|
||||||
|
|
||||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
Window xwin = meta_window_actor_get_x_window (self);
|
Window xwin = meta_window_get_toplevel_xwindow (metaWindow);
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
@ -1608,15 +1576,10 @@ meta_window_actor_new (MetaWindow *window)
|
|||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
MetaWindowActor *self;
|
MetaWindowActor *self;
|
||||||
MetaWindowActorPrivate *priv;
|
MetaWindowActorPrivate *priv;
|
||||||
Window top_window;
|
|
||||||
ClutterActor *window_group;
|
ClutterActor *window_group;
|
||||||
|
|
||||||
top_window = meta_window_get_toplevel_xwindow (window);
|
|
||||||
meta_verbose ("add window: Meta %p, xwin 0x%x\n", window, (guint)top_window);
|
|
||||||
|
|
||||||
self = g_object_new (META_TYPE_WINDOW_ACTOR,
|
self = g_object_new (META_TYPE_WINDOW_ACTOR,
|
||||||
"meta-window", window,
|
"meta-window", window,
|
||||||
"x-window", top_window,
|
|
||||||
"meta-screen", screen,
|
"meta-screen", screen,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@ -1885,8 +1848,8 @@ check_needs_pixmap (MetaWindowActor *self)
|
|||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
|
Window xwindow = meta_window_get_toplevel_xwindow (priv->window);
|
||||||
MetaCompositor *compositor;
|
MetaCompositor *compositor;
|
||||||
Window xwindow = priv->xwindow;
|
|
||||||
|
|
||||||
if (!priv->needs_pixmap)
|
if (!priv->needs_pixmap)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user