[clutter/wip/actor-content: 1/25] x11: Provide a StageWindow::unrealize implementation



commit 26b2dffd53bf578a52270661479be5cce9cfebe1
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Apr 14 15:43:19 2011 +0100

    x11: Provide a StageWindow::unrealize implementation
    
    The implementation just removes the StageX11 pointer from the X11
    Window â?? ClutterStageX11 mapping we set up in ::realize.

 clutter/x11/clutter-stage-x11.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c
index 5421742..36e6916 100644
--- a/clutter/x11/clutter-stage-x11.c
+++ b/clutter/x11/clutter-stage-x11.c
@@ -371,6 +371,22 @@ set_cursor_visible (ClutterStageX11 *stage_x11)
     }
 }
 
+static void
+clutter_stage_x11_unrealize (ClutterStageWindow *stage_window)
+{
+  ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (stage_window);
+
+  if (clutter_stages_by_xid != NULL)
+    {
+      CLUTTER_NOTE (BACKEND, "Removing X11 stage 0x%x [%p]",
+                    (unsigned int) stage_x11->xwin,
+                    stage_x11);
+
+      g_hash_table_remove (clutter_stages_by_xid,
+                           GINT_TO_POINTER (stage_x11->xwin));
+    }
+}
+
 static gboolean
 clutter_stage_x11_realize (ClutterStageWindow *stage_window)
 {
@@ -763,6 +779,7 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
   iface->resize = clutter_stage_x11_resize;
   iface->get_geometry = clutter_stage_x11_get_geometry;
   iface->realize = clutter_stage_x11_realize;
+  iface->unrealize = clutter_stage_x11_unrealize;
 }
 
 static inline void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]