1
0
mirror of https://github.com/brl/mutter.git synced 2025-06-18 19:19:31 +00:00

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
This commit is contained in:
Olivier Fourdan
2016-10-11 15:20:30 +02:00
committed by Jonas Ådahl
parent d911c5aac4
commit e8fc09064a

@ -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;
}