sw/source/uibase/inc/conttree.hxx | 2 ++ vcl/source/app/salvtables.cxx | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit a3a6ff25f5749207dbfae3d22ec5f2a3c8623d9a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Aug 7 10:32:37 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Aug 9 20:17:48 2020 +0200 block gen's focus in/out callbacks from grab_focus like gtk's Change-Id: I6102022495f5ffe644b4aa2b71df2fcf4e0a7b6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100299 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 6f65b1984523..640bda8c2e6e 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -246,6 +246,7 @@ public: void grab_focus() { m_xTreeView->grab_focus(); + FocusHdl(*m_xTreeView); } OUString get_selected_text() const @@ -341,6 +342,7 @@ public: void grab_focus() { m_xTreeView->grab_focus(); + FocusInHdl(*m_xTreeView); } int count_selected_rows() const diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 3c95b11eeb33..03d95b7bb219 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -258,7 +258,12 @@ void SalInstanceWidget::set_can_focus(bool bCanFocus) m_xWidget->SetStyle(nStyle); } -void SalInstanceWidget::grab_focus() { m_xWidget->GrabFocus(); } +void SalInstanceWidget::grab_focus() +{ + disable_notify_events(); + m_xWidget->GrabFocus(); + enable_notify_events(); +} bool SalInstanceWidget::has_focus() const { return m_xWidget->HasFocus(); } @@ -529,6 +534,8 @@ SystemWindow* SalInstanceWidget::getSystemWindow() { return m_xWidget->GetSystem void SalInstanceWidget::HandleEventListener(VclWindowEvent& rEvent) { + if (notify_events_disabled()) + return; if (rEvent.GetId() == VclEventId::WindowGetFocus) m_aFocusInHdl.Call(*this); else if (rEvent.GetId() == VclEventId::WindowLoseFocus) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits