From 78657dafcac2ba657860e927aba596b66c349a77 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 28 Apr 2014 15:51:41 -0400 Subject: [PATCH] window-wayland: Clean up a bit --- src/wayland/window-wayland.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c index bc4af5623..ea0674bc8 100644 --- a/src/wayland/window-wayland.c +++ b/src/wayland/window-wayland.c @@ -164,12 +164,14 @@ meta_window_wayland_move_resize_internal (MetaWindow *window, if (should_move) { - if (constrained_rect.x != window->rect.x || - constrained_rect.y != window->rect.y) + int new_x = constrained_rect.x; + int new_y = constrained_rect.y; + + if (new_x != window->rect.x || new_y != window->rect.y) { *result |= META_MOVE_RESIZE_RESULT_MOVED; - window->rect.x = constrained_rect.x; - window->rect.y = constrained_rect.y; + window->rect.x = new_x; + window->rect.y = new_y; } } }