diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-09-16 19:11:56 -0600 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-09-16 19:11:56 -0600 |
commit | 43b3573c511f33e2df17a470c9d9190c017d9317 (patch) | |
tree | d305c4a1ac47b3d137b0cb2650f2f73c4a319963 | |
parent | ac6ec168da84e4597a78691e16c9a74a9dd1f703 (diff) | |
download | mutter-43b3573c511f33e2df17a470c9d9190c017d9317.tar.gz |
window-wayland: Always update the last_sent size
The last_sent size is effectively what size we should send in configure
requests where the size hasn't changed. Thus, if an app commits a new
size, we need to make sure we respect it and don't reconfigure it with
a size it wasn't expecting when the state changes.
This fixes apps being sent a configure event with 0, 0 on startup,
which was confusing Clutter into displaying a 0x0 viewport.
-rw-r--r-- | src/wayland/window-wayland.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c index 9a82b354b..ee5f047b0 100644 --- a/src/wayland/window-wayland.c +++ b/src/wayland/window-wayland.c @@ -191,9 +191,6 @@ meta_window_wayland_move_resize_internal (MetaWindow *window, if (constrained_rect.width != window->rect.width || constrained_rect.height != window->rect.height) { - wl_window->last_sent_width = constrained_rect.width; - wl_window->last_sent_height = constrained_rect.height; - meta_wayland_surface_configure_notify (window->surface, constrained_rect.width, constrained_rect.height, @@ -210,6 +207,13 @@ meta_window_wayland_move_resize_internal (MetaWindow *window, } } + if (wl_window->last_sent_width != constrained_rect.width || + wl_window->last_sent_height != constrained_rect.height) + { + wl_window->last_sent_width = constrained_rect.width; + wl_window->last_sent_height = constrained_rect.height; + } + if (can_move_now) { int new_x = constrained_rect.x; |