summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-07 10:32:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-09 20:17:48 +0200
commita3a6ff25f5749207dbfae3d22ec5f2a3c8623d9a (patch)
treedd8c1803c68bff3b8bd37d7011c0df8cdeca252a /vcl/source
parenta7c8c5f49af7ad8c1101a4c73dbe7a83b7ba8cb5 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx9
1 files changed, 8 insertions, 1 deletions
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)