[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 6 12:51:55 UTC 2020
svx/source/form/formcontroller.cxx | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
New commits:
commit a9d0edf10235e9eabaa15ad8e6761fa525d2eff4
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 5 17:32:31 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 6 14:51:10 2020 +0200
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 at redhat.com>
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 ) );
More information about the Libreoffice-commits
mailing list