[gtk+] wayland: Fix gdk_window_wayland_resize_cairo_surface()



commit 6ea4bf8a9d60ab22e2ddf84243b629791ef59c4d
Author: Rui Matos <tiagomatos gmail com>
Date:   Sat Feb 22 19:10:59 2014 +0100

    wayland: Fix gdk_window_wayland_resize_cairo_surface()
    
    Like in other backends (except X) we can't resize cairo image surfaces
    so let's sync the code here with what the other backends do.
    
    This prevents the painting machinery above us to paint on the wrong
    buffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724968

 gdk/wayland/gdkwindow-wayland.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index b0772b5..d980bf8 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1487,7 +1487,10 @@ gdk_window_wayland_resize_cairo_surface (GdkWindow       *window,
                                          gint             width,
                                          gint             height)
 {
-  return surface;
+  /* cairo image surfaces cannot be resized */
+  cairo_surface_destroy (surface);
+
+  return NULL;
 }
 
 static cairo_region_t *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]