From 04f969a596788eaa02892040f68e6d29729db614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 21 Nov 2015 16:08:19 +0100 Subject: [PATCH] BWindow::MoveOnScreen(): Need to use inner frame for resize. * 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. --- src/kits/interface/Window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index b9e19b85464..694be5fa3cc 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -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