diff options
Diffstat (limited to 'vcl/source/control/ctrl.cxx')
-rw-r--r-- | vcl/source/control/ctrl.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 09fb464e662e..6d6843b9c6e4 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -223,6 +223,11 @@ OUString Control::GetDisplayText() const return mxLayoutData ? mxLayoutData->m_aDisplayText : GetText(); } +bool Control::FocusWindowBelongsToControl(const vcl::Window* pFocusWin) const +{ + return ImplIsWindowOrChild(pFocusWin); +} + bool Control::EventNotify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) @@ -241,7 +246,7 @@ bool Control::EventNotify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { vcl::Window* pFocusWin = Application::GetFocusWindow(); - if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) ) + if ( !pFocusWin || !FocusWindowBelongsToControl(pFocusWin) ) { mbHasControlFocus = false; CompatStateChanged( StateChangedType::ControlFocus ); |