wayland: Don't move the window when we're simply sending out a configure

If we're sending out a configure event, we can't immediately move the
window; we need to instead wait to apply the new position when the
client sends a new buffer.
This commit is contained in:
Jasper St. Pierre 2014-04-16 16:28:43 -04:00
parent c1f4352683
commit f25243e121

View File

@ -119,6 +119,8 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
MetaMoveResizeFlags flags,
MetaMoveResizeResultFlags *result)
{
gboolean should_move = FALSE;
g_assert (window->frame == NULL);
/* For wayland clients, the size is completely determined by the client,
@ -139,6 +141,10 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
window->rect.width = requested_rect.width;
window->rect.height = requested_rect.height;
/* This is a commit of an attach. We should move the window to match the
* new position the client wants. */
should_move = TRUE;
}
if (constrained_rect.width != window->rect.width ||
@ -149,9 +155,15 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
constrained_rect.width,
constrained_rect.height);
}
else
{
/* We're just moving the window, so we don't need to wait for a configure
* and then ack to simply move the window. */
should_move = TRUE;
}
if (constrained_rect.x != window->rect.x ||
constrained_rect.y != window->rect.y)
if (should_move && (constrained_rect.x != window->rect.x ||
constrained_rect.y != window->rect.y))
{
*result |= META_MOVE_RESIZE_RESULT_MOVED;
window->rect.x = constrained_rect.x;