@@ -223,9 +223,14 @@ TermWindow::TermWindow(const BString& title, Arguments* args)
|
|||||||
BRect frame;
|
BRect frame;
|
||||||
uint32 workspaces;
|
uint32 workspaces;
|
||||||
if (_LoadWindowPosition(&frame, &workspaces) == B_OK) {
|
if (_LoadWindowPosition(&frame, &workspaces) == B_OK) {
|
||||||
// apply
|
// make sure the window is still on screen
|
||||||
MoveTo(frame.LeftTop());
|
// (for example if there was a resolution change)
|
||||||
ResizeTo(frame.Width(), frame.Height());
|
if (frame.Intersects(BScreen(this).Frame())) {
|
||||||
|
MoveTo(frame.LeftTop());
|
||||||
|
ResizeTo(frame.Width(), frame.Height());
|
||||||
|
} else
|
||||||
|
CenterOnScreen();
|
||||||
|
|
||||||
SetWorkspaces(workspaces);
|
SetWorkspaces(workspaces);
|
||||||
} else {
|
} else {
|
||||||
// use computed defaults
|
// use computed defaults
|
||||||
|
|||||||
Reference in New Issue
Block a user