From 9ffb6b9866cc852b1bb0c2be9789858810060d2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 21 Jul 2011 11:33:47 -0700 Subject: [PATCH] compositor: Only configure surface when it changes geometry --- compositor/compositor.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/compositor/compositor.c b/compositor/compositor.c index 4afdea2..177de54 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -1028,14 +1028,13 @@ surface_attach(struct wl_client *client, &es->buffer_destroy_listener.link); if (es->visual == NULL) - fprintf(stderr, "initial attach for surface %p\n", surface); - - if (es->visual == NULL) wl_list_insert(&es->compositor->surface_list, &es->link); es->visual = buffer->visual; - wlsc_surface_configure(es, es->x + x, es->y + y, - buffer->width, buffer->height); + if (x != 0 || y != 0 || + es->width != buffer->width || es->height != buffer->height) + wlsc_surface_configure(es, es->x + x, es->y + y, + buffer->width, buffer->height); wlsc_buffer_attach(buffer, surface); -- 2.7.4