[gtk+/saved/mir: 40/47] Regenerate surface on resize



commit f6229528be860b0e110f8f623efd9d14cdcbbe10
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Jun 10 15:23:06 2014 +1200

    Regenerate surface on resize

 gdk/mir/gdkmirwindowimpl.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 8eada37..311b4b6 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -467,9 +467,19 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
         impl->transient_size.height = height;
     }
 
-  /* If resize requested then destroy surface */
+  /* If resize requested then rebuild surface */
   if (width >= 0)
-    ensure_no_surface (window);
+  {
+    /* We accept any resize */
+    window->width = width;
+    window->height = height;
+
+    if (impl->surface)
+      {
+        ensure_no_surface (window);
+        ensure_surface (window);
+      }
+  }
 }
 
 static void


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