Author: czeidler Date: 2011-08-02 07:00:22 +0200 (Tue, 02 Aug 2011) New Revision: 42537 Changeset: https://dev.haiku-os.org/changeset/42537 Ticket: https://dev.haiku-os.org/ticket/7893 Modified: haiku/trunk/src/servers/app/Window.cpp Log: Check size limit of all stacked windows when resizing. Fixes #7893 thanks to diver (again). Modified: haiku/trunk/src/servers/app/Window.cpp =================================================================== --- haiku/trunk/src/servers/app/Window.cpp 2011-08-02 01:07:10 UTC (rev 42536) +++ haiku/trunk/src/servers/app/Window.cpp 2011-08-02 05:00:22 UTC (rev 42537) @@ -340,16 +340,23 @@ int32 wantHeight = fFrame.IntegerHeight() + y; // enforce size limits - if (wantWidth < fMinWidth) - wantWidth = fMinWidth; - if (wantWidth > fMaxWidth) - wantWidth = fMaxWidth; + WindowStack* stack = GetWindowStack(); + if (resizeStack && stack) { + for (int32 i = 0; i < stack->CountWindows(); i++) { + Window* window = stack->WindowList().ItemAt(i); - if (wantHeight < fMinHeight) - wantHeight = fMinHeight; - if (wantHeight > fMaxHeight) - wantHeight = fMaxHeight; + if (wantWidth < window->fMinWidth) + wantWidth = window->fMinWidth; + if (wantWidth > window->fMaxWidth) + wantWidth = window->fMaxWidth; + if (wantHeight < window->fMinHeight) + wantHeight = window->fMinHeight; + if (wantHeight > window->fMaxHeight) + wantHeight = window->fMaxHeight; + } + } + x = wantWidth - fFrame.IntegerWidth(); y = wantHeight - fFrame.IntegerHeight(); @@ -371,7 +378,6 @@ if (decorator && resizeStack) decorator->ResizeBy(x, y, dirtyRegion); - WindowStack* stack = GetWindowStack(); if (resizeStack && stack) { for (int32 i = 0; i < stack->CountWindows(); i++) { Window* window = stack->WindowList().ItemAt(i);