]> Pileus Git - ~andy/gtk/commitdiff
wayland: Adapt move_resize vfunc implementation to match semantics
authorRob Bradford <rob@linux.intel.com>
Tue, 17 Jan 2012 14:59:03 +0000 (14:59 +0000)
committerRob Bradford <rob@linux.intel.com>
Tue, 17 Jan 2012 15:05:03 +0000 (15:05 +0000)
Callers of this function were passing in -1, -1 for the width and height if
they just wanted the window moving - rather than the size changing. We need to
respect that behaviour and don't try and set the width/height to those
dimensions.

Now pop-up windows (ala combo-boxes) work!

gdk/wayland/gdkwindow-wayland.c

index 834642e1ab1faa6a4853d1c3e9c9e502ef8e6619..897c61c412abe931a82bea40950ac769a7c0b9b8 100644 (file)
@@ -637,7 +637,11 @@ gdk_window_wayland_move_resize (GdkWindow *window,
   window->x = x;
   window->y = y;
 
-  _gdk_wayland_window_update_size (window, width, height, 0);
+  /* If this function is called with width and height = -1 then that means
+   * just move the window - don't update its size
+   */
+  if (width > 0 && height > 0)
+    _gdk_wayland_window_update_size (window, width, height, 0);
 }
 
 static void