[mutter/wip/mult-window-actors: 6/10] window-actor: Remove (private) xwindow property
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/mult-window-actors: 6/10] window-actor: Remove (private) xwindow property
- Date: Fri, 6 Dec 2013 20:40:41 +0000 (UTC)
commit a48d1f31073df721a1672485b201cb38b89bce57
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Dec 6 00:59:20 2013 -0500
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
src/compositor/meta-window-actor.c | 51 +++++-------------------------------
1 files changed, 7 insertions(+), 44 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 93fa476..bad1c78 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -37,7 +37,6 @@
struct _MetaWindowActorPrivate
{
MetaWindow *window;
- Window xwindow;
MetaScreen *screen;
ClutterActor *actor;
@@ -147,7 +146,6 @@ enum
{
PROP_META_WINDOW = 1,
PROP_META_SCREEN,
- PROP_X_WINDOW,
PROP_NO_SHADOW,
PROP_SHADOW_CLASS
};
@@ -231,18 +229,6 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
PROP_META_SCREEN,
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",
"No shadow",
"Do not add shaddow to this window",
@@ -286,7 +272,6 @@ window_decorated_notify (MetaWindow *mw,
MetaScreen *screen = priv->screen;
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
- Window new_xwindow;
/*
* Basically, we have to reconstruct the the internals of this object
@@ -331,10 +316,12 @@ meta_window_actor_constructed (GObject *object)
MetaWindowActorPrivate *priv = self->priv;
MetaScreen *screen = priv->screen;
MetaDisplay *display = meta_screen_get_display (screen);
- Window xwindow = priv->xwindow;
MetaWindow *window = priv->window;
Display *xdisplay = meta_display_get_xdisplay (display);
XRenderPictFormat *format;
+ Window xwindow;
+
+ xwindow = meta_window_get_toplevel_xwindow (window);
priv->damage = XDamageCreate (xdisplay, xwindow,
XDamageReportBoundingBox);
@@ -464,9 +451,6 @@ meta_window_actor_set_property (GObject *object,
case PROP_META_SCREEN:
priv->screen = g_value_get_pointer (value);
break;
- case PROP_X_WINDOW:
- priv->xwindow = g_value_get_ulong (value);
- break;
case PROP_NO_SHADOW:
{
gboolean newv = g_value_get_boolean (value);
@@ -514,9 +498,6 @@ meta_window_actor_get_property (GObject *object,
case PROP_META_SCREEN:
g_value_set_pointer (value, priv->screen);
break;
- case PROP_X_WINDOW:
- g_value_set_ulong (value, priv->xwindow);
- break;
case PROP_NO_SHADOW:
g_value_set_boolean (value, priv->no_shadow);
break;
@@ -785,20 +766,6 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
}
/**
- * 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:
* @self: a #MetaWindowActor
*
@@ -1280,7 +1247,7 @@ meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
MetaDisplay *display = meta_window_get_display (metaWindow);
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)
{
@@ -1532,15 +1499,11 @@ meta_window_actor_new (MetaWindow *window)
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaWindowActor *self;
MetaWindowActorPrivate *priv;
- Window top_window;
ClutterActor *window_group;
- meta_verbose ("add window: Meta %p, xwin 0x%x\n", window, (guint)top_window);
-
self = g_object_new (META_TYPE_WINDOW_ACTOR,
- "meta-window", window,
- "x-window", meta_window_get_toplevel_xwindow (window),
- "meta-screen", screen,
+ "meta-window", window,
+ "meta-screen", screen,
NULL);
priv = self->priv;
@@ -1808,8 +1771,8 @@ check_needs_pixmap (MetaWindowActor *self)
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
+ Window xwindow = meta_window_get_toplevel_xwindow (priv->window);
MetaCompositor *compositor;
- Window xwindow = priv->xwindow;
if (!priv->needs_pixmap)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]