st/egl/wayland: Take resize parameters only if size changes
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Thu, 23 Jun 2011 10:12:52 +0000 (12:12 +0200)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Thu, 23 Jun 2011 10:17:48 +0000 (12:17 +0200)
This matches what we do in egl_dri2, and clients should
behave like this anyway.

src/gallium/state_trackers/egl/wayland/native_wayland.c

index 3d1bb6ff8b1bbaee85701c74e08d10675688d122..f183538e7b6d22b2a34c280c70f21c02dd0ba285 100644 (file)
@@ -195,13 +195,11 @@ wayland_window_surface_handle_resize(struct wayland_surface *surface)
             wl_buffer_destroy(surface->buffer[i]);
          surface->buffer[i] = NULL;
       }
+
+      surface->dx = surface->win->dx;
+      surface->dy = surface->win->dy;
    }
    pipe_resource_reference(&front_resource, NULL);
-
-   surface->dx = surface->win->dx;
-   surface->dy = surface->win->dy;
-   surface->win->dx = 0;
-   surface->win->dy = 0;
 }
 
 static boolean