diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2016-10-11 15:20:30 +0200 |
---|---|---|
committer | Jonas Ã…dahl <jadahl@gmail.com> | 2016-10-19 17:31:44 +0800 |
commit | e8fc09064afd8b1d50ff401140c412db558a2d62 (patch) | |
tree | 842dad7e2c41c9ea04c850f93701ab6b1c7f39d6 | |
parent | d911c5aac4f36963aa925dd50c2912c0e612d80e (diff) | |
download | mutter-e8fc09064afd8b1d50ff401140c412db558a2d62.tar.gz |
wayland: apply size hints after placing the window
Otherwise the window will be shown initially in the wrong position then
moved quickly as soon as it's made visible, which is confusing.
https://bugzilla.gnome.org/show_bug.cgi?id=772729
-rw-r--r-- | src/wayland/meta-wayland-xdg-shell.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c index 005e753d0..450acda7d 100644 --- a/src/wayland/meta-wayland-xdg-shell.c +++ b/src/wayland/meta-wayland-xdg-shell.c @@ -622,6 +622,12 @@ xdg_toplevel_role_commit (MetaWaylandSurfaceRole *surface_role, return; } + window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface); + meta_window_wayland_move_resize (window, + &xdg_surface_priv->acked_configure_serial, + window_geometry, + pending->dx, pending->dy); + /* When we get to this point, we ought to have valid size hints */ if (pending->has_new_min_size || pending->has_new_max_size) { @@ -644,11 +650,6 @@ xdg_toplevel_role_commit (MetaWaylandSurfaceRole *surface_role, } } - window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface); - meta_window_wayland_move_resize (window, - &xdg_surface_priv->acked_configure_serial, - window_geometry, - pending->dx, pending->dy); xdg_surface_priv->acked_configure_serial.set = FALSE; } |