window-wayland: Clean up a bit

This commit is contained in:
Jasper St. Pierre 2014-04-28 15:51:41 -04:00
parent 0f47eae33a
commit 78657dafca

View File

@ -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;
}
}
}