summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2016-10-11 15:20:30 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2016-10-12 10:16:13 +0200
commitd7f61e48ac67d86c9bb5a71b4e660733d047a069 (patch)
tree144963486550998741d93ba014f16f119a579a67
parent9de6de5802fb7559c71617bf2944100703cbdbff (diff)
downloadmutter-d7f61e48ac67d86c9bb5a71b4e660733d047a069.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.c11
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 e9223a9a2..7a69e55ab 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -617,6 +617,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)
{
@@ -639,11 +645,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;
}