mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
wayland: Only set newly_attached if the buffer changes
This cleans up the check to determine if the buffer changed, meaning we shouldn't have to pass it around like we needed to do before.
This commit is contained in:
parent
f5e77d7f63
commit
d0f0be8b03
@ -150,7 +150,7 @@ commit_attached_buffer (MetaWaylandSurface *surface,
|
||||
MetaWaylandDoubleBufferedState *pending)
|
||||
{
|
||||
/* wl_surface.attach */
|
||||
if (pending->newly_attached && surface->buffer != pending->buffer)
|
||||
if (pending->newly_attached)
|
||||
{
|
||||
surface_set_buffer (surface, pending->buffer);
|
||||
return TRUE;
|
||||
@ -416,6 +416,9 @@ wl_surface_attach (struct wl_client *client,
|
||||
else
|
||||
buffer = NULL;
|
||||
|
||||
if (surface->buffer == buffer)
|
||||
return;
|
||||
|
||||
if (surface->pending.buffer)
|
||||
wl_list_remove (&surface->pending.buffer_destroy_listener.link);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user