static void shell_gtk_window_actor_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { ShellGtkWindowActor *wactor = SHELL_GTK_WINDOW_ACTOR (object); switch (prop_id) { case PROP_WINDOW: wactor->priv->window = g_value_dup_object (value); /* Here automatic=FALSE means to use CompositeRedirectManual. * That is, the X server shouldn't draw the window onto the * screen. */ clutter_x11_texture_pixmap_set_window (CLUTTER_X11_TEXTURE_PIXMAP (wactor), GDK_WINDOW_XWINDOW (wactor->priv->window->window), FALSE); /* Here automatic has a different meaning--whether * ClutterX11TexturePixmap should process damage update and * refresh the pixmap itself. */ clutter_x11_texture_pixmap_set_automatic (CLUTTER_X11_TEXTURE_PIXMAP (wactor), TRUE); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void clutter_x11_texture_pixmap_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { ClutterX11TexturePixmap *texture = CLUTTER_X11_TEXTURE_PIXMAP (object); switch (prop_id) { case PROP_PIXMAP: clutter_x11_texture_pixmap_set_pixmap (texture, g_value_get_uint (value)); break; case PROP_AUTO: clutter_x11_texture_pixmap_set_automatic (texture, g_value_get_boolean (value)); break; case PROP_WINDOW: clutter_x11_texture_pixmap_set_window (texture, g_value_get_uint (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void cinnamon_gtk_embed_on_window_realize (GtkWidget *widget, CinnamonGtkEmbed *embed) { /* Here automatic=FALSE means to use CompositeRedirectManual. * That is, the X server shouldn't draw the window onto the * screen. */ clutter_x11_texture_pixmap_set_window (CLUTTER_X11_TEXTURE_PIXMAP (embed), gdk_x11_window_get_xid (gtk_widget_get_window (widget)), FALSE); }
static void cinnamon_gtk_embed_set_window (CinnamonGtkEmbed *embed, CinnamonEmbeddedWindow *window) { if (embed->priv->window) { _cinnamon_embedded_window_set_actor (embed->priv->window, NULL); g_object_unref (embed->priv->window); clutter_x11_texture_pixmap_set_window (CLUTTER_X11_TEXTURE_PIXMAP (embed), None, FALSE); g_signal_handlers_disconnect_by_func (embed->priv->window, (gpointer)cinnamon_gtk_embed_on_window_destroy, embed); g_signal_handlers_disconnect_by_func (embed->priv->window, (gpointer)cinnamon_gtk_embed_on_window_realize, embed); } embed->priv->window = window; if (embed->priv->window) { g_object_ref (embed->priv->window); _cinnamon_embedded_window_set_actor (embed->priv->window, embed); g_signal_connect (embed->priv->window, "destroy", G_CALLBACK (cinnamon_gtk_embed_on_window_destroy), embed); g_signal_connect (embed->priv->window, "realize", G_CALLBACK (cinnamon_gtk_embed_on_window_realize), embed); if (gtk_widget_get_realized (GTK_WIDGET (window))) cinnamon_gtk_embed_on_window_realize (GTK_WIDGET (embed->priv->window), embed); } clutter_actor_queue_relayout (CLUTTER_ACTOR (embed)); }