mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
wayland-surface: Restructure code flow in wl_surface_attach a bit more...
This commit is contained in:
parent
ea1b8cdc22
commit
7841042a85
@ -156,7 +156,11 @@ meta_surface_actor_attach_wayland_buffer (MetaSurfaceActor *self,
|
||||
{
|
||||
MetaSurfaceActorPrivate *priv = self->priv;
|
||||
priv->buffer = buffer;
|
||||
|
||||
if (buffer)
|
||||
meta_shaped_texture_set_texture (self->priv->texture, buffer->texture);
|
||||
else
|
||||
meta_shaped_texture_set_texture (self->priv->texture, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -286,15 +286,13 @@ toplevel_surface_commit (MetaWaylandSurface *surface)
|
||||
{
|
||||
ensure_buffer_texture (buffer);
|
||||
meta_wayland_buffer_reference (&surface->buffer_ref, buffer);
|
||||
meta_surface_actor_attach_wayland_buffer (surface_actor, buffer);
|
||||
surface_process_damage (surface, surface->pending.damage);
|
||||
|
||||
meta_window_set_surface_mapped (window, buffer != NULL);
|
||||
|
||||
if (buffer != NULL)
|
||||
{
|
||||
meta_surface_actor_attach_wayland_buffer (surface_actor, buffer);
|
||||
|
||||
/* We resize X based surfaces according to X events */
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
|
||||
if (buffer != NULL && window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
|
||||
{
|
||||
int new_width;
|
||||
int new_height;
|
||||
@ -309,9 +307,6 @@ toplevel_surface_commit (MetaWaylandSurface *surface)
|
||||
surface->pending.dx, surface->pending.dy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
surface_process_damage (surface, surface->pending.damage);
|
||||
|
||||
if (surface->pending.opaque_region)
|
||||
meta_surface_actor_set_opaque_region (surface_actor, surface->pending.opaque_region);
|
||||
|
Loading…
Reference in New Issue
Block a user