[gtk+/wip/csd: 426/429] stash: reorder the destroy after attach of new buffer (?)
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd: 426/429] stash: reorder the destroy after attach of new buffer (?)
- Date: Tue, 22 Jan 2013 18:05:29 +0000 (UTC)
commit 3a5e9bf03b42301ef3a470ae2c2cd5a0ac3c5275
Author: Rob Bradford <rob linux intel com>
Date: Fri Jul 27 11:40:35 2012 +0100
stash: reorder the destroy after attach of new buffer (?)
gdk/wayland/gdkwindow-wayland.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 088c59c..b33f00a 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -316,6 +316,7 @@ gdk_wayland_window_attach_image (GdkWindow *window)
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
int32_t server_width, server_height, dx, dy;
+ cairo_surface_t *old_server_surface = NULL;
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -339,7 +340,7 @@ gdk_wayland_window_attach_image (GdkWindow *window)
server_width = data->width;
server_height = data->height;
- cairo_surface_destroy (impl->server_surface);
+ old_server_surface = impl->server_surface;
}
else
{
@@ -366,6 +367,9 @@ gdk_wayland_window_attach_image (GdkWindow *window)
/* Attach this new buffer to the surface */
wl_surface_attach (impl->surface, data->buffer, dx, dy);
+
+ if (old_server_surface)
+ cairo_surface_destroy (old_server_surface);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]