Skip to content

Commit

Permalink
BWindow::MoveOnScreen(): Need to use inner frame for resize.
Browse files Browse the repository at this point in the history
* This caused the window to grow each time.
* This was especially noticeable at applications that store their
  size on quit, and restore it on start.
* This fixes bug #12456.
  • Loading branch information
axeld committed Nov 22, 2015
1 parent 5dc0eff commit 04f969a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kits/interface/Window.cpp
Expand Up @@ -2596,7 +2596,10 @@ BWindow::MoveOnScreen(uint32 flags)
if (frame.Height() > screenFrame.Height())
frame.bottom -= frame.Height() - screenFrame.Height();

ResizeTo(frame.Width(), frame.Height());
BRect innerFrame = frame;
innerFrame.top += tabHeight;
innerFrame.InsetBy(borderWidth, borderWidth);
ResizeTo(innerFrame.Width(), innerFrame.Height());
}

if (((flags & B_MOVE_IF_PARTIALLY_OFFSCREEN) == 0
Expand Down

0 comments on commit 04f969a

Please sign in to comment.