include/vcl/customweld.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 0d4ffe9a63422f30752bf886ab23ab1b8d2b10f9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Nov 11 20:24:30 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Nov 12 09:47:08 2020 +0100 tdf#138078 only call GetFocus if we gained focus from an unfocused state Change-Id: I7733cdb2bbed8e39dbbafd63b360513ab9ad5e6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105612 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx index df7b97e070d7..b19b64bf980e 100644 --- a/include/vcl/customweld.hxx +++ b/include/vcl/customweld.hxx @@ -65,8 +65,10 @@ public: virtual void Hide() { m_pDrawingArea->hide(); } void GrabFocus() { + bool bHadFocus = m_pDrawingArea->has_focus(); m_pDrawingArea->grab_focus(); - if (m_pDrawingArea->has_focus()) + // tdf#138078 only call GetFocus if we gained focus from an unfocused state + if (!bHadFocus && m_pDrawingArea->has_focus()) GetFocus(); } bool HasFocus() const { return m_pDrawingArea->has_focus(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits