summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2020-02-20 16:42:09 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2020-02-22 02:08:50 +0100
commitb26ca5b13733b46c2df0787502f885e15b390956 (patch)
tree4696f5a77d33e5f96970a3cb14c0eba2f1bd2316
parent38306ea92560c82b0d70bdc195267549a8bab830 (diff)
tdf#130841 resize to client size after SetPosSize
This fixes the hack of the native menu bar with a smaller client size in relation to the frame geometry. Eventually this should be replaced by proper mnTopBorder usage, but this currently isn't working. Change-Id: Ib5825d9c8f77e463fcb086e0373228fe91d8705a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89202 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--vcl/source/window/window.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c4ef69e6d07c..cf56c9331e5e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2836,6 +2836,10 @@ void Window::setPosSizePixel( long nX, long nY,
pWindow->mpWindowImpl->mpFrame->SetPosSize( nX, nY, nWidth, nHeight, nSysFlags );
+ // Adjust resize with the hack of different client size and frame geometries to fix
+ // native menu bars. Eventually this should be replaced by proper mnTopBorder usage.
+ pWindow->mpWindowImpl->mpFrame->GetClientSize(nWidth, nHeight);
+
// Resize should be called directly. If we haven't
// set the correct size, we get a second resize from
// the system with the correct size. This can be happened