From 8313747b531d9f5e80cb79966056782504fd1542 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Tue, 26 Jul 2011 23:18:28 +0000 Subject: [PATCH] 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 --- src/servers/app/Desktop.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index d7c3e46690..2fc0a6349a 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -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(); }