window-actor: Set actor as compositor private in window before the surface

In MetaWindowActor creation we're setting the compositor private (i.e. the
window actor itself) of a window before creating the surface actor, and so
passing to the it a window without its compositor side set.

Since the surface actor might use the parent actor, set this before updating
the surface.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/660
This commit is contained in:
Marco Trevisan (Treviño) 2019-06-28 11:18:22 +02:00
parent 4061c8384b
commit 7776941b89

View File

@ -427,6 +427,9 @@ meta_window_actor_constructed (GObject *object)
priv->compositor = window->display->compositor; priv->compositor = window->display->compositor;
/* Hang our compositor window state off the MetaWindow for fast retrieval */
meta_window_set_compositor_private (window, object);
meta_window_actor_update_surface (self); meta_window_actor_update_surface (self);
meta_window_actor_update_opacity (self); meta_window_actor_update_opacity (self);
@ -443,9 +446,6 @@ meta_window_actor_constructed (GObject *object)
priv->first_frame_state = DRAWING_FIRST_FRAME; priv->first_frame_state = DRAWING_FIRST_FRAME;
meta_window_actor_sync_actor_geometry (self, priv->window->placed); meta_window_actor_sync_actor_geometry (self, priv->window->placed);
/* Hang our compositor window state off the MetaWindow for fast retrieval */
meta_window_set_compositor_private (window, object);
} }
static void static void