diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qt5/QtInstanceWidget.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/vcl/qt5/QtInstanceWidget.cxx b/vcl/qt5/QtInstanceWidget.cxx index bdeb1bf83f3a..f5f359b536c3 100644 --- a/vcl/qt5/QtInstanceWidget.cxx +++ b/vcl/qt5/QtInstanceWidget.cxx @@ -65,7 +65,20 @@ bool QtInstanceWidget::has_focus() const bool QtInstanceWidget::is_active() const { return has_focus(); } -bool QtInstanceWidget::has_child_focus() const { return true; } +bool QtInstanceWidget::has_child_focus() const +{ + QWidget* pFocusWidget = QApplication::focusWidget(); + if (!pFocusWidget) + return false; + + QWidget* pParent = pFocusWidget->parentWidget(); + while (pParent) + { + if (pParent == m_pWidget) + return true; + } + return false; +} void QtInstanceWidget::show() {} |