diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-08 22:34:13 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-09 00:34:16 +0300 |
commit | 445f157a132ba977fc026746221f8e85daa289cb (patch) | |
tree | 57b775a68ad5779b68d3995cf901249844fec160 | |
parent | 23567618f0ee316aae080a7fa60e804282c0df07 (diff) |
Add title-based tearoff to DockingManager, take 2
Change-Id: I2582756fd1fb6e823daa7336a7fb1ce5d752f83e
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 06cb139b1966..0bc7ce232281 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -1056,7 +1056,12 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin mpOldBorderWin = nullptr; // no border window found // the new parent for popup mode - VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, this, bool(nFlags & FloatWinPopupFlags::AllowTearOff) ); + VclPtr<FloatingWindow> pWin; + bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff ); + if ( bAllowTearOff && !dynamic_cast< ToolBox* >( GetWindow() ) ) + pWin = VclPtr<FloatingWindow>::Create( mpParent, WB_STDPOPUP ); + else + pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, this, bAllowTearOff ); pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) ); pWin->SetText( GetWindow()->GetText() ); |