vcl/source/window/syswin.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
New commits: commit 9fdd671fb276a419089f26e47739c4a783d15e93 Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Wed Jan 27 19:51:30 2016 +0100 tdf#96393: reuse layout if available If position and size were loaded from the WindowStateData structure there's no need to recompute the layout. As an added benefit if the user previously resized/move the dialog, the new one will open using the same geometry. Change-Id: I306504080357f9be8f3e628ba13ca5dc2957dd52 Reviewed-on: https://gerrit.libreoffice.org/21850 Tested-by: Jenkins <[email protected]> Reviewed-by: jan iversen <[email protected]> Tested-by: jan iversen <[email protected]> diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 19ec2f9..080d72a 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -641,6 +641,13 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) aState.mnWidth = rData.GetWidth(); aState.mnHeight = rData.GetHeight(); + if ( (aState.mnMask & SAL_FRAME_POSSIZE_X) && + (aState.mnMask & SAL_FRAME_POSSIZE_Y) && + (aState.mnMask & SAL_FRAME_POSSIZE_WIDTH) && + (aState.mnMask & SAL_FRAME_POSSIZE_HEIGHT) ) { + mbInitialLayoutDone = true; + } + if( rData.GetMask() & (WINDOWSTATE_MASK_WIDTH|WINDOWSTATE_MASK_HEIGHT) ) { // #i43799# adjust window state sizes if a minimal output size was set @@ -1100,11 +1107,13 @@ void SystemWindow::DoInitialLayout() if (isLayoutEnabled()) { - mbIsCalculatingInitialLayoutSize = true; - setDeferredProperties(); - setOptimalLayoutSize(); - mbIsCalculatingInitialLayoutSize = false; - mbInitialLayoutDone = true; + if (!mbInitialLayoutDone) { + mbIsCalculatingInitialLayoutSize = true; + setDeferredProperties(); + setOptimalLayoutSize(); + mbIsCalculatingInitialLayoutSize = false; + mbInitialLayoutDone = true; + } } else if (IsDialog() && !(GetStyle() & WB_SIZEABLE)) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
