Made the code a bit nicer by following Stefano's and Stephan's suggestion.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14840 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -91,10 +91,7 @@ MainWindow::MainWindow()
|
|||||||
|
|
||||||
// make sure window is on screen
|
// make sure window is on screen
|
||||||
BScreen screen(this);
|
BScreen screen(this);
|
||||||
if (Frame().left > screen.Frame().right - 10
|
if (!screen.Frame().InsetByCopy(10, 10).Intersects(Frame()))
|
||||||
|| Frame().top > screen.Frame().bottom - 10
|
|
||||||
|| Frame().right < screen.Frame().left + 10
|
|
||||||
|| Frame().bottom < screen.Frame().top + 10)
|
|
||||||
_Center();
|
_Center();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user