Kaydet (Commit) 19c3559e authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: rhbz#1397181 toolbar layout manager not respecting drag cancel

plus restore original mbDockCanceled state after wayland-enforced
cancel otherwise next drag won't work

Change-Id: Idefed25b925b36d0bf72b77609c4fc2eb47f71b9
üst 6971159b
...@@ -3476,6 +3476,9 @@ throw (uno::RuntimeException, std::exception) ...@@ -3476,6 +3476,9 @@ throw (uno::RuntimeException, std::exception)
void SAL_CALL ToolbarLayoutManager::endDocking( const awt::EndDockingEvent& e ) void SAL_CALL ToolbarLayoutManager::endDocking( const awt::EndDockingEvent& e )
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
if (e.bCancelled)
return;
bool bDockingInProgress( false ); bool bDockingInProgress( false );
bool bStartDockFloated( false ); bool bStartDockFloated( false );
bool bFloating( false ); bool bFloating( false );
......
...@@ -935,6 +935,7 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMo ...@@ -935,6 +935,7 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMo
{ {
Rectangle aRect( rRect ); Rectangle aRect( rRect );
bool bOrigDockCanceled = mbDockCanceled;
if (bFloatMode && !StyleSettings::GetDockingFloatsSupported()) if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
mbDockCanceled = true; mbDockCanceled = true;
...@@ -971,6 +972,8 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMo ...@@ -971,6 +972,8 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMo
// must be enabled in Window::Notify to prevent permanent docking during mouse move // must be enabled in Window::Notify to prevent permanent docking during mouse move
mbStartDockingEnabled = false; mbStartDockingEnabled = false;
mbDockCanceled = bOrigDockCanceled;
} }
bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() bool ImplDockingWindowWrapper::PrepareToggleFloatingMode()
......
...@@ -589,6 +589,7 @@ bool DockingWindow::Docking( const Point&, Rectangle& ) ...@@ -589,6 +589,7 @@ bool DockingWindow::Docking( const Point&, Rectangle& )
void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode )
{ {
bool bOrigDockCanceled = mbDockCanceled;
if (bFloatMode && !StyleSettings::GetDockingFloatsSupported()) if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
mbDockCanceled = true; mbDockCanceled = true;
...@@ -614,6 +615,7 @@ void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) ...@@ -614,6 +615,7 @@ void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode )
Show(); Show();
} }
mbDocking = false; mbDocking = false;
mbDockCanceled = bOrigDockCanceled;
} }
bool DockingWindow::PrepareToggleFloatingMode() bool DockingWindow::PrepareToggleFloatingMode()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment