Add MoveOnScreen() calls to a number of applications.

Technically reverts 039f93ce5e,
but just moves the call elsewhere.

Should fix #19164.

Change-Id: I3f240d4a28a4ec522382440944a3c80a74bbaa0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8445
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Augustin Cavalier 2024-10-11 15:40:33 -04:00 committed by waddlesplash
parent 9d9aa08a75
commit 0324754ddb
6 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,6 @@ ActivityMonitor::ActivityMonitor()
: BApplication(kSignature)
{
fWindow = new ActivityWindow();
fWindow->MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
}

View File

@ -45,6 +45,7 @@ ActivityWindow::ActivityWindow()
if (settings.FindRect("window frame", &frame) == B_OK) {
MoveTo(frame.LeftTop());
ResizeTo(frame.Width(), frame.Height());
MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
} else {
float scaling = be_plain_font->Size() / 12.0f;
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);

View File

@ -136,6 +136,7 @@ CharacterWindow::CharacterWindow()
if (settings.FindRect("window frame", &frame) == B_OK) {
MoveTo(frame.LeftTop());
ResizeTo(frame.Width(), frame.Height());
MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
} else {
float scaling = be_plain_font->Size() / 12.0f;
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);

View File

@ -59,9 +59,10 @@ CalcWindow::CalcWindow(BRect frame, BMessage* settings)
fCalcView->AddChild(dragger);
BRect rect;
if (settings->FindRect("window frame", &rect) == B_OK)
if (settings->FindRect("window frame", &rect) == B_OK) {
SetFrame(rect);
else
MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
} else
SetFrame(frame, true);
// Add shortcut keys to menu options

View File

@ -156,11 +156,9 @@ SudokuWindow::SudokuWindow()
if (settings.FindRect("window frame", &frame) == B_OK) {
MoveTo(frame.LeftTop());
ResizeTo(frame.Width(), frame.Height());
frame.OffsetTo(B_ORIGIN);
} else {
float scaling = std::max(1.0f, be_plain_font->Size() / 12.0f);
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
frame = Bounds();
}
MoveOnScreen();

View File

@ -295,6 +295,7 @@ BackgroundsView::AllAttached()
if (fSettings.FindPoint("pos", &point) == B_OK) {
fFoundPositionSetting = true;
Window()->MoveTo(point);
Window()->MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
}
fApply->SetEnabled(false);