[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c02ea79 1/5: Let default focus event handling
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c02ea79 1/5: Let default focus event handling happen in InputSequenceEntry (VZ) |
Date: |
Tue, 21 Feb 2017 11:44:27 -0500 (EST) |
branch: master
commit c02ea79b5d4fb8e93d68bc09b1264cb155dec465
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Let default focus event handling happen in InputSequenceEntry (VZ)
Never prevent the native text control from getting the event about the
focus loss, whatever else we do, because this prevents it from hiding
its caret when this happens and, more generally, puts it in an
inconsistent state.
---
input_sequence_entry.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index 9679c2d..acafe90 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -1491,6 +1491,10 @@ std::string InputSequenceEntry::field_name() const
void InputSequenceEntry::UponChildKillFocus(wxFocusEvent& event)
{
+ // Never prevent the default focus event handling from taking place,
+ // whatever else we do with it.
+ event.Skip();
+
// Check whether the given possibly null window is a child of another one.
auto const is_child_of = [](wxWindow const* c, wxWindow const* p)
{
@@ -1507,7 +1511,6 @@ void InputSequenceEntry::UponChildKillFocus(wxFocusEvent&
event)
|| is_child_of(wxGetTopLevelParent(event.GetWindow()), button_)
)
{
- event.Skip();
return;
}