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 <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
9d9aa08a75
commit
0324754ddb
@@ -21,7 +21,6 @@ ActivityMonitor::ActivityMonitor()
|
||||
: BApplication(kSignature)
|
||||
{
|
||||
fWindow = new ActivityWindow();
|
||||
fWindow->MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user