[mutter/gnome-3-24] wayland: place window if maximized before placement



commit 7801df7ef6c721c403f472056eec13a5e7566888
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed May 10 11:32:29 2017 +0200

    wayland: place window if maximized before placement
    
    If a client changes the state of a surface to issue a set_maximize, this
    causes apply_pending_state() to be called before mutter has placed the
    window.
    
    If the monitor on which the window is to be shown initially is different
    from the one where the pointer is placed, this causes the effect to be
    played at the wrong location before the window eventually reaches its
    location on another monitor.
    
    Force the window to be placed prior to change its state to maximized in
    xdg-shell so that mutter won't relocate the window afterwards.
    
    This also avoids sending an xdg_toplevel.configure with a size of 0x0
    which would cause the client to initially draw its surface with some
    arbitrary size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782183
    https://bugzilla.gnome.org/show_bug.cgi?id=781353

 src/wayland/meta-wayland-xdg-shell.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index e840365..afe9546 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -348,6 +348,7 @@ xdg_toplevel_set_maximized (struct wl_client   *client,
 {
   MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
 
+  meta_window_force_placement (surface->window);
   meta_window_maximize (surface->window, META_MAXIMIZE_BOTH);
 }
 


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