summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-05 17:32:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-06 14:51:10 +0200
commita9d0edf10235e9eabaa15ad8e6761fa525d2eff4 (patch)
tree7d716c6c69f0125383cb7c58db8843466aa24c85
parentcfc210dc7a7bc79c8fa2c9415e50c0da86968ef9 (diff)
don't deactivate if focus hasn't moved to another window
Change-Id: Ie019b8a0757578dec30c4834d095e75cd48ae957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/form/formcontroller.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index a292f702f8ff..000b568662f4 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -1719,7 +1719,6 @@ void FormController::focusGained(const FocusEvent& e)
xContext->makeVisible( xCurrentControl );
}
-
IMPL_LINK_NOARG( FormController, OnActivated, void*, void )
{
EventObject aEvent;
@@ -1727,7 +1726,6 @@ IMPL_LINK_NOARG( FormController, OnActivated, void*, void )
m_aActivateListeners.notifyEach( &XFormControllerListener::formActivated, aEvent );
}
-
IMPL_LINK_NOARG( FormController, OnDeactivated, void*, void )
{
EventObject aEvent;
@@ -1735,7 +1733,6 @@ IMPL_LINK_NOARG( FormController, OnDeactivated, void*, void )
m_aActivateListeners.notifyEach( &XFormControllerListener::formDeactivated, aEvent );
}
-
void FormController::focusLost(const FocusEvent& e)
{
OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
@@ -1743,6 +1740,9 @@ void FormController::focusLost(const FocusEvent& e)
m_aControlBorderManager.focusLost( e.Source );
Reference< XWindowPeer > xNext(e.NextFocus, UNO_QUERY);
+ // if focus hasn't passed to some other window, e.g. focus in a welded item, don't deactivate
+ if (!xNext)
+ return;
Reference< XControl > xNextControl = isInList(xNext);
if (!xNextControl.is())
{
@@ -1751,31 +1751,26 @@ void FormController::focusLost(const FocusEvent& e)
}
}
-
void SAL_CALL FormController::mousePressed( const awt::MouseEvent& /*_rEvent*/ )
{
// not interested in
}
-
void SAL_CALL FormController::mouseReleased( const awt::MouseEvent& /*_rEvent*/ )
{
// not interested in
}
-
void SAL_CALL FormController::mouseEntered( const awt::MouseEvent& _rEvent )
{
m_aControlBorderManager.mouseEntered( _rEvent.Source );
}
-
void SAL_CALL FormController::mouseExited( const awt::MouseEvent& _rEvent )
{
m_aControlBorderManager.mouseExited( _rEvent.Source );
}
-
void SAL_CALL FormController::componentValidityChanged( const EventObject& _rSource )
{
Reference< XControl > xControl( findControl( m_aControls, Reference< XControlModel >( _rSource.Source, UNO_QUERY ), false, false ) );