As done in move, resize only the top layer window. The top layer window resizes the lower windows separately.

Use auto locker.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42502 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-07-26 23:18:28 +00:00
parent 6a0ed7da53
commit 8313747b53

View File

@ -1333,8 +1333,7 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
if (x == 0 && y == 0)
return;
if (!LockAllWindows())
return;
AutoWriteLocker _(fWindowLock);
Window* topWindow = window->TopLayerStackWindow();
if (topWindow)
@ -1356,7 +1355,6 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
window->MoveBy((int32)x, (int32)y);
NotifyWindowMoved(window);
UnlockAllWindows();
return;
}
@ -1411,8 +1409,6 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
}
NotifyWindowMoved(window);
UnlockAllWindows();
}
@ -1422,13 +1418,15 @@ Desktop::ResizeWindowBy(Window* window, float x, float y)
if (x == 0 && y == 0)
return;
if (!LockAllWindows())
return;
AutoWriteLocker _(fWindowLock);
Window* topWindow = window->TopLayerStackWindow();
if (topWindow)
window = topWindow;
if (!window->IsVisible()) {
window->ResizeBy((int32)x, (int32)y, NULL);
NotifyWindowResized(window);
UnlockAllWindows();
return;
}
@ -1471,8 +1469,6 @@ Desktop::ResizeWindowBy(Window* window, float x, float y)
}
NotifyWindowResized(window);
UnlockAllWindows();
}