mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
wayland-surface: Create the surface actor ourselves
Otherwise, we can't rely on a surface_actor being around to add ourselves to...
This commit is contained in:
parent
f9a2c64460
commit
5089a63d76
@ -407,10 +407,11 @@ meta_window_actor_constructed (GObject *object)
|
|||||||
|
|
||||||
if (!priv->surface)
|
if (!priv->surface)
|
||||||
{
|
{
|
||||||
priv->surface = meta_surface_actor_new ();
|
|
||||||
|
|
||||||
if (window->surface)
|
if (window->surface)
|
||||||
window->surface->surface_actor = priv->surface;
|
priv->surface = window->surface->surface_actor;
|
||||||
|
else
|
||||||
|
priv->surface = meta_surface_actor_new ();
|
||||||
|
g_object_ref_sink (priv->surface);
|
||||||
|
|
||||||
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
|
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
|
||||||
|
|
||||||
@ -420,15 +421,6 @@ meta_window_actor_constructed (GObject *object)
|
|||||||
G_CALLBACK (surface_allocation_changed_notify),
|
G_CALLBACK (surface_allocation_changed_notify),
|
||||||
self);
|
self);
|
||||||
|
|
||||||
/*
|
|
||||||
* Since we are holding a pointer to this actor independently of the
|
|
||||||
* ClutterContainer internals, and provide a public API to access it,
|
|
||||||
* add a reference here, so that if someone is messing about with us
|
|
||||||
* via the container interface, we do not end up with a dangling pointer.
|
|
||||||
* We will release it in dispose().
|
|
||||||
*/
|
|
||||||
g_object_ref (priv->surface);
|
|
||||||
|
|
||||||
g_signal_connect_object (window, "notify::decorated",
|
g_signal_connect_object (window, "notify::decorated",
|
||||||
G_CALLBACK (window_decorated_notify), self, 0);
|
G_CALLBACK (window_decorated_notify), self, 0);
|
||||||
g_signal_connect_object (window, "notify::appears-focused",
|
g_signal_connect_object (window, "notify::appears-focused",
|
||||||
|
@ -450,6 +450,7 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
|||||||
surface_handle_pending_buffer_destroy;
|
surface_handle_pending_buffer_destroy;
|
||||||
wl_list_init (&surface->pending.frame_callback_list);
|
wl_list_init (&surface->pending.frame_callback_list);
|
||||||
|
|
||||||
|
surface->surface_actor = meta_surface_actor_new ();
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user