[gtk+] gdkwindow-wayland: Don't post CONFIGURE events for the same size



commit 12fc77ad98651b0d83ca2c59cc82981f22c8eb2a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jun 19 14:31:23 2014 -0400

    gdkwindow-wayland: Don't post CONFIGURE events for the same size
    
    The Wayland compositor is completely allowed to send us configure
    events for the same size, and this validly happens if we're changing
    states. Fizzle these out.

 gdk/wayland/gdkwindow-wayland.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 8abfdd4..a9a2dc6 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -596,11 +596,11 @@ gdk_wayland_window_configure (GdkWindow *window,
   GdkDisplay *display;
   GdkEvent *event;
 
+  if (window->width == width && window->height == height)
+    return;
+
   display = gdk_window_get_display (window);
 
-  /* TODO: Only generate a configure event if width/height/scale have actually
-   * changed?
-   */
   event = gdk_event_new (GDK_CONFIGURE);
   event->configure.window = window;
   event->configure.send_event = FALSE;


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