[gtk+/gtk-3-8] broadway: Ensure window sizes are synched right



commit 859d50209583b789b5f5aa6da47d2b6c1a89c7a0
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Mar 28 19:00:23 2013 +0100

    broadway: Ensure window sizes are synched right
    
    We don't want to update the window size on configure event, only
    the position, as the size is client side controlled. We were
    updating to an old size during resizes which causes us to send
    surfaces of the wrong size to the daemon.

 gdk/broadway/broadway-server.c |    5 +++++
 gdk/broadway/gdkeventsource.c  |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c
index 86f0053..77dd894 100644
--- a/gdk/broadway/broadway-server.c
+++ b/gdk/broadway/broadway-server.c
@@ -1583,6 +1583,11 @@ broadway_server_window_update (BroadwayServer *server,
                                                       window->width,
                                                       window->height);
 
+  g_assert (window->width == cairo_image_surface_get_width (window->last_surface));
+  g_assert (window->width == cairo_image_surface_get_width (surface));
+  g_assert (window->height == cairo_image_surface_get_height (window->last_surface));
+  g_assert (window->height == cairo_image_surface_get_height (surface));
+
   if (server->output != NULL)
     {
       if (window->last_synced)
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c
index a4399c4..a23da78 100644
--- a/gdk/broadway/gdkeventsource.c
+++ b/gdk/broadway/gdkeventsource.c
@@ -256,10 +256,6 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
       {
        window->x = message->configure_notify.x;
        window->y = message->configure_notify.y;
-       window->width = message->configure_notify.width;
-       window->height = message->configure_notify.height;
-       _gdk_window_update_size (window);
-       _gdk_broadway_window_resize_surface (window);
 
        event = gdk_event_new (GDK_CONFIGURE);
        event->configure.window = g_object_ref (window);


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