[haiku-commits] r39535 - haiku/trunk/src/add-ons/decorators/SATDecorator

Author: czeidler
Date: 2010-11-20 08:07:32 +0100 (Sat, 20 Nov 2010)
New Revision: 39535
Changeset: http://dev.haiku-os.org/changeset/39535

Modified:
   haiku/trunk/src/add-ons/decorators/SATDecorator/SATGroup.cpp
Log:
Fix restoring of stacked windows.



Modified: haiku/trunk/src/add-ons/decorators/SATDecorator/SATGroup.cpp
===================================================================
--- haiku/trunk/src/add-ons/decorators/SATDecorator/SATGroup.cpp        
2010-11-20 06:47:20 UTC (rev 39534)
+++ haiku/trunk/src/add-ons/decorators/SATDecorator/SATGroup.cpp        
2010-11-20 07:07:32 UTC (rev 39535)
@@ -854,20 +854,21 @@
 
                // adding windows to area
                uint64 windowId;
-               WindowArea* area = NULL;
+               SATWindow* prevWindow = NULL;
                for (int32 i = 0; areaArchive.FindInt64("window", i,
                        (int64*)&windowId) == B_OK; i++) {
                        SATWindow* window = sat->FindSATWindow(windowId);
                        if (!window)
                                continue;
 
-                       if (area == NULL) {
+                       if (prevWindow == NULL) {
                                if (!group->AddWindow(window, left, top, right, 
bottom))
-                                       return B_ERROR;
-                               area = window->GetWindowArea();
+                                       continue;
+                               prevWindow = window;
                        } else {
-                               if (!group->AddWindow(window, area))
-                                       return B_ERROR;
+                               if (!prevWindow->StackWindow(window))
+                                       continue;
+                               prevWindow = window;
                        }
                }
        }


Other related posts:

  • » [haiku-commits] r39535 - haiku/trunk/src/add-ons/decorators/SATDecorator - clemens . zeidler