wxEVT_KILL_FOCUS absent and wxFocusEvent GetWindow returns NULL or incorrectly in wxOSX-Cocoa
|Reported by:||aasselin||Owned by:||csomor|
|Keywords:||EVT_KILL_FOCUS wxFocusEvent GetWindow||Cc:|
the controls sample demonstrate the problem on the choice and the radio box (the Focus Got log is well printed but then Focus Lost is never)
it seems related to #12267, however removing the if otherWindow==this does not fix entirely the problem (although it fixes the problem in my app)
there is something bizarre in this test, because resignFirstResponder is sent _before_ becomeFirstResponder and hence I don't see how FindFocus function could return something valid (after adding some logs, it always return otherWindow==this in fact for both resign/become events), so of course the otherWindow==this would block all events and remove the wxGrid problem...
what it means by the way is that in wxCocoa, the wxFocusEvent::GetWindow is always bad currently, even once the events are (nearly) well sent.
in addition the resignFirstResponder for combo does not work because once the first responder becomes the editor inside it (we ignore this first event), we don't catch anymore the event for the editor, and thus there is no kill focus event sent at all when leaving the combo
I don't know however how to fix that part.
Change History (21)
comment:5 Changed 22 months ago by johnr
- Keywords wxFocusEvent GetWindow added
- Status changed from infoneeded_new to new
- Summary changed from wxEVT_KILL_FOCUS on wxCocoa to wxEVT_KILL_FOCUS absent and wxFocusEvent GetWindow returns NULL or incorrectly in wxOSX-Cocoa