[mutter/wip/wayland-fixes: 2/2] wayland: Fix the placement of popup windows



commit a27e844f750952d7d960e68d35b429b71e3ad2db
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 17 09:36:31 2014 -0600

    wayland: Fix the placement of popup windows
    
    The fix in d61dde1 regressed the position of popup windows, since the
    size was 0x0 when we wanted to do a sole move. Only fizzle out in the
    path where we actually *do* resize.

 src/wayland/window-wayland.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index 491faf6..2673db3 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -188,21 +188,20 @@ meta_window_wayland_move_resize_internal (MetaWindow                *window,
     }
   else
     {
-      /* If we get a 0x0 size, this means that we're trying to resize
-       * a surface that doesn't have any buffer attached. This can happen
-       * when a client requests an xdg surface before bringing it up.
-       * The constrained_rect will be 1x1 because of how our constraints
-       * code works, and sending that to the window would cause it to
-       * redraw itself, so just don't send anything. Pretend like this
-       * move_resize never happened.
-       */
-      if (unconstrained_rect.width == 0 &&
-          unconstrained_rect.height == 0)
-        return;
-
       if (constrained_rect.width != window->rect.width ||
           constrained_rect.height != window->rect.height)
         {
+          /* If we get a 0x0 size, this means that we're trying to resize
+           * a surface that doesn't have any buffer attached. This can happen
+           * when a client requests an xdg surface before bringing it up.
+           * The constrained_rect will be 1x1 because of how our constraints
+           * code works, and sending that to the window would cause it to
+           * redraw itself, so just don't send anything.
+           */
+          if (unconstrained_rect.width == 0 &&
+              unconstrained_rect.height == 0)
+            return;
+
           meta_wayland_surface_configure_notify (window->surface,
                                                  constrained_rect.width,
                                                  constrained_rect.height,


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