diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-22 17:26:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-23 11:58:00 +0200 |
commit | db1cf111666847ce5ce93d18ae5ae8c29a4c44d6 (patch) | |
tree | 56af2730e4ecb6c907c796dc196e767904150449 /svx | |
parent | 983c1146ac80c038feae653e8e3752a72171d6cb (diff) |
undo blocking emitting focus events during grab_focus
revert...
commit f97dbac73fe149e8fed0932890d0c1d6be4869a3
Author: Caolán McNamara <caolanm@redhat.com>
Date: Wed Jun 26 21:00:02 2019 +0100
infinite focus changing in toc biblio page
which blocked calling focus-changed callbacks when grab_focus is called
explicitly analogous to how we block value-changed callbacks setting
values through code but don't block them when the value is changed by
user interaction.
In retrospect that was a poor choice, so revert that and subsequent
workarounds in favour of just not calling gtk_grab_focus if the widget
already has focus.
checked:
a) tdf#138427 focus set to wrong input box
b) tdf#138078 only call GetFocus if we gained focus from an unfocused state
c) tdf#137993 ensure the toplevel vcl::Window is activated
d) tdf#136941 call focus in handler explicitly
Change-Id: I411480e2d627aa9995fb41b0aa17e9fb6d34d73f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114524
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 3 | ||||
-rw-r--r-- | svx/source/inc/findtextfield.hxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 6 |
3 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 75b1707591e1..5c6c81c9aa60 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -192,7 +192,10 @@ bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt) CaptureMouse(); if (!HasFocus()) + { GrabFocus(); + GetFocus(); + } EditView* pEditView = GetEditView(); return pEditView && pEditView->MouseButtonDown(rMEvt); diff --git a/svx/source/inc/findtextfield.hxx b/svx/source/inc/findtextfield.hxx index 7ff507f8aac4..bce8b5589e16 100644 --- a/svx/source/inc/findtextfield.hxx +++ b/svx/source/inc/findtextfield.hxx @@ -39,8 +39,6 @@ public: virtual ~FindTextFieldControl() override; - virtual void GetFocus() override; - void Remember_Impl(const OUString& rStr); void SetTextToSelected_Impl(); diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 3e38304727c7..c75c3edb03ef 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -405,12 +405,6 @@ void FindTextFieldControl::set_entry_message_type(weld::EntryMessageType eType) m_xWidget->set_entry_message_type(eType); } -void FindTextFieldControl::GetFocus() -{ - InterimItemWindow::GetFocus(); - FocusIn(); -} - namespace { class SearchToolbarControllersManager |