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:
parent
c1f4352683
commit
f25243e121
@ -119,6 +119,8 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
|||||||
MetaMoveResizeFlags flags,
|
MetaMoveResizeFlags flags,
|
||||||
MetaMoveResizeResultFlags *result)
|
MetaMoveResizeResultFlags *result)
|
||||||
{
|
{
|
||||||
|
gboolean should_move = FALSE;
|
||||||
|
|
||||||
g_assert (window->frame == NULL);
|
g_assert (window->frame == NULL);
|
||||||
|
|
||||||
/* For wayland clients, the size is completely determined by the client,
|
/* 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.width = requested_rect.width;
|
||||||
window->rect.height = requested_rect.height;
|
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 ||
|
if (constrained_rect.width != window->rect.width ||
|
||||||
@ -149,9 +155,15 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
|||||||
constrained_rect.width,
|
constrained_rect.width,
|
||||||
constrained_rect.height);
|
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 ||
|
if (should_move && (constrained_rect.x != window->rect.x ||
|
||||||
constrained_rect.y != window->rect.y)
|
constrained_rect.y != window->rect.y))
|
||||||
{
|
{
|
||||||
*result |= META_MOVE_RESIZE_RESULT_MOVED;
|
*result |= META_MOVE_RESIZE_RESULT_MOVED;
|
||||||
window->rect.x = constrained_rect.x;
|
window->rect.x = constrained_rect.x;
|
||||||
|
Loading…
Reference in New Issue
Block a user