diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2017-05-10 08:59:53 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2017-05-12 17:00:48 +0200 |
commit | 7f0f880fba6c1b066cfa3d36aa113cc0d46fadad (patch) | |
tree | 7088ae26c663360c0141f02478a9371bf658bb23 | |
parent | ca31e4dc147997cae5abb75bf630acaaa30d2a8b (diff) | |
download | mutter-7f0f880fba6c1b066cfa3d36aa113cc0d46fadad.tar.gz |
wayland: Apply size hints regardless of geometry
Previously we would bail out early in xdg_toplevel_role_commit() if no
geometry change was set, ignoring the possible min/max size hints
changes.
But setting a min/max size hint without changing the geometry is
perfectly valid, so we ought to apply the min/max changes regardless of
a geometry change.
https://bugzilla.gnome.org/show_bug.cgi?id=782213
-rw-r--r-- | src/wayland/meta-wayland-xdg-shell.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c index 9791b9f87..e8403657b 100644 --- a/src/wayland/meta-wayland-xdg-shell.c +++ b/src/wayland/meta-wayland-xdg-shell.c @@ -624,20 +624,18 @@ xdg_toplevel_role_commit (MetaWaylandSurfaceRole *surface_role, if (!window) return; - if (!pending->has_new_geometry) + if (pending->has_new_geometry) { - if (pending->dx != 0 || pending->dx != 0) - { - g_warning ("XXX: Attach-initiated move without a new geometry. This is unimplemented right now."); - } - 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); + } + else if (pending->dx != 0 || pending->dx != 0) + { + g_warning ("XXX: Attach-initiated move without a new geometry. This is unimplemented right now."); } - - 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) |