[mutter] window-wayland: Split an if statement in two



commit 0f47eae33a85d74d02ed10a06e513a62e8a02a2a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 28 15:50:40 2014 -0400

    window-wayland: Split an if statement in two

 src/wayland/window-wayland.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index 1d7319c..bc4af56 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -162,12 +162,15 @@ meta_window_wayland_move_resize_internal (MetaWindow                *window,
       should_move = TRUE;
     }
 
-  if (should_move && (constrained_rect.x != window->rect.x ||
-                      constrained_rect.y != window->rect.y))
+  if (should_move)
     {
-      *result |= META_MOVE_RESIZE_RESULT_MOVED;
-      window->rect.x = constrained_rect.x;
-      window->rect.y = constrained_rect.y;
+      if (constrained_rect.x != window->rect.x ||
+          constrained_rect.y != window->rect.y)
+        {
+          *result |= META_MOVE_RESIZE_RESULT_MOVED;
+          window->rect.x = constrained_rect.x;
+          window->rect.y = constrained_rect.y;
+        }
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]