summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-12 18:05:31 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-05-12 18:25:24 -0400
commit33cb7f4a2cd1cf93c9caf6e1b364e04ef297823e (patch)
tree22bf2c18d87fce7021a4f93f764dc3f70360405c /src
parent7732447abc087fe06899f2144f585d661c10a6c3 (diff)
downloadmutter-33cb7f4a2cd1cf93c9caf6e1b364e04ef297823e.tar.gz
wayland: Send a correct width / height for state changes
If we send out a configure notify for a window and then have some other kind of state change, we need to make sure that we continue to send out that new size, rather than the last size the client sent us a buffer for. In particular, a client might give us a 250x250 buffer and then immediately request fullscreen. We send out a configure for the monitor size and a state that tells it it's full-screen, but then it takes focus, and since the client hasn't sent us a buffer for the new size, we tell it it's fullscreen at 250x250. Fix this.
Diffstat (limited to 'src')
-rw-r--r--src/wayland/window-wayland.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index b74fc787b..5cfee476a 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -38,6 +38,9 @@ struct _MetaWindowWayland
gboolean has_saved_pos;
int saved_x;
int saved_y;
+
+ int last_sent_width;
+ int last_sent_height;
};
struct _MetaWindowWaylandClass
@@ -160,6 +163,9 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
wl_window->saved_x = constrained_rect.x;
wl_window->saved_y = constrained_rect.y;
+ 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);
@@ -188,9 +194,11 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
static void
surface_state_changed (MetaWindow *window)
{
+ MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window);
+
meta_wayland_surface_configure_notify (window->surface,
- window->rect.width,
- window->rect.height);
+ wl_window->last_sent_width,
+ wl_window->last_sent_height);
}
static void