diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index da9769c1bf..e464fb252f 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1983,6 +1983,10 @@ BWindow::ConvertFromScreen(BRect rect) const bool BWindow::IsMinimized() const { + BAutolock locker(const_cast(this)); + if (!locker.IsLocked()) + return false; + // Hiding takes precendence over minimization!!! if (IsHidden()) return false; @@ -2456,7 +2460,7 @@ BWindow::CenterIn(const BRect& rect) // Set size limits now if needed _CheckSizeLimits(); - MoveTo(BLayoutUtils::AlignInFrame(rect, Size(), + MoveTo(BLayoutUtils::AlignInFrame(rect, Size(), BAlignment(B_ALIGN_HORIZONTAL_CENTER, B_ALIGN_VERTICAL_CENTER)).LeftTop()); }