* IsMinimized() now locks the window. This should fix bug #4274.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32902 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1983,6 +1983,10 @@ BWindow::ConvertFromScreen(BRect rect) const
|
|||||||
bool
|
bool
|
||||||
BWindow::IsMinimized() const
|
BWindow::IsMinimized() const
|
||||||
{
|
{
|
||||||
|
BAutolock locker(const_cast<BWindow*>(this));
|
||||||
|
if (!locker.IsLocked())
|
||||||
|
return false;
|
||||||
|
|
||||||
// Hiding takes precendence over minimization!!!
|
// Hiding takes precendence over minimization!!!
|
||||||
if (IsHidden())
|
if (IsHidden())
|
||||||
return false;
|
return false;
|
||||||
@@ -2456,7 +2460,7 @@ BWindow::CenterIn(const BRect& rect)
|
|||||||
// Set size limits now if needed
|
// Set size limits now if needed
|
||||||
_CheckSizeLimits();
|
_CheckSizeLimits();
|
||||||
|
|
||||||
MoveTo(BLayoutUtils::AlignInFrame(rect, Size(),
|
MoveTo(BLayoutUtils::AlignInFrame(rect, Size(),
|
||||||
BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
||||||
B_ALIGN_VERTICAL_CENTER)).LeftTop());
|
B_ALIGN_VERTICAL_CENTER)).LeftTop());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user