[haiku-commits] r42502 - haiku/trunk/src/servers/app

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 27 Jul 2011 01:18:28 +0200 (CEST)

Author: czeidler
Date: 2011-07-27 01:18:28 +0200 (Wed, 27 Jul 2011)
New Revision: 42502
Changeset: https://dev.haiku-os.org/changeset/42502

Modified:
   haiku/trunk/src/servers/app/Desktop.cpp
Log:
As done in move, resize only the top layer window. The top layer window resizes 
the lower windows separately.
Use auto locker.
 


Modified: haiku/trunk/src/servers/app/Desktop.cpp
===================================================================
--- haiku/trunk/src/servers/app/Desktop.cpp     2011-07-26 22:18:55 UTC (rev 
42501)
+++ haiku/trunk/src/servers/app/Desktop.cpp     2011-07-26 23:18:28 UTC (rev 
42502)
@@ -1333,8 +1333,7 @@
        if (x == 0 && y == 0)
                return;
 
-       if (!LockAllWindows())
-               return;
+       AutoWriteLocker _(fWindowLock);
 
        Window* topWindow = window->TopLayerStackWindow();
        if (topWindow)
@@ -1356,7 +1355,6 @@
                        window->MoveBy((int32)x, (int32)y);
 
                NotifyWindowMoved(window);
-               UnlockAllWindows();
                return;
        }
 
@@ -1411,8 +1409,6 @@
        }
 
        NotifyWindowMoved(window);
-
-       UnlockAllWindows();
 }
 
 
@@ -1422,13 +1418,15 @@
        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 @@
        }
 
        NotifyWindowResized(window);
-
-       UnlockAllWindows();
 }
 
 


Other related posts: