[Libreoffice-commits] core.git: vcl/source

Maxim Monastirsky momonasmon at gmail.com
Thu Dec 22 00:10:53 UTC 2016


 vcl/source/window/dockmgr.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2a4cd80abcf9e515d1ce3b3a944b573bdc42bff2
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Thu Dec 22 02:01:59 2016 +0200

    Fix ToolbarMenu position
    
    Change-Id: I3a6380845687a809e155ebcf8ff8d3b2e5e6a4ec

diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index ac587a6..0393836 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -968,11 +968,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
         mpOldBorderWin = nullptr;  // no border window found
 
     bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff );
-    bool bIsToolBox = GetWindow()->GetType() == WINDOW_TOOLBOX;
+    bool bUseStdPopup = bAllowTearOff && GetWindow()->GetType() != WINDOW_TOOLBOX;
 
     // the new parent for popup mode
     VclPtr<FloatingWindow> pWin;
-    if ( bAllowTearOff && !bIsToolBox )
+    if ( bUseStdPopup )
         pWin = VclPtr<FloatingWindow>::Create( mpParent, WB_STDPOPUP );
     else
         pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, this, bAllowTearOff );
@@ -988,7 +988,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
     GetWindow()->mpWindowImpl->mnBottomBorder  = 0;
 
     // position toolbox below the drag grip
-    if ( bIsToolBox )
+    if ( !bUseStdPopup )
         GetWindow()->SetPosPixel( static_cast<ImplPopupFloatWin*>( pWin.get() )->GetToolboxPosition() );
 
     // reparent borderwindow and window


More information about the Libreoffice-commits mailing list