[mutter] wayland: Don't move the window when we're simply sending out a configure
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Don't move the window when we're simply sending out a configure
- Date: Wed, 16 Apr 2014 20:32:19 +0000 (UTC)
commit f25243e121ab05dddaed0a8a481b68c176dd4b41
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Apr 16 16:28:43 2014 -0400
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.
src/wayland/window-wayland.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index 64df0fc..52bea59 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]