vcl/source/uitest/logger.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 4e02fee0022e2f05927eec69773ecb8ce519c19e Author: Markus Mohrhard <markus.mohrh...@googlemail.com> AuthorDate: Wed Sep 26 17:31:31 2018 +0200 Commit: Markus Mohrhard <markus.mohrh...@googlemail.com> CommitDate: Wed Sep 26 23:27:08 2018 +0200 uitest: checking whether we have focus needs to be recursive Change-Id: Id18a56cdf5b23433178882a953fd85954c0ccc1c Reviewed-on: https://gerrit.libreoffice.org/61008 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Jenkins diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx index 82da48256cc4..432a6af86b18 100644 --- a/vcl/source/uitest/logger.cxx +++ b/vcl/source/uitest/logger.cxx @@ -88,15 +88,18 @@ void UITestLogger::logCommand(const OUString& rAction, const css::uno::Sequence< namespace { // most likely this should be recursive -bool child_windows_have_focus(VclPtr<Control> const & xUIElement) +bool child_windows_have_focus(VclPtr<vcl::Window> const & xUIElement) { sal_Int32 nCount = xUIElement->GetChildCount(); for (sal_Int32 i = 0; i < nCount; ++i) { - if (xUIElement->GetChild(i)->HasFocus()) + vcl::Window* pChild = xUIElement->GetChild(i); + if (pChild->HasFocus()) { return true; } + if (child_windows_have_focus(VclPtr<vcl::Window>(pChild))) + return true; } return false; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits