Translate QFocusEvent to wxFocusEvent correctly

Set the ID, object and the associated window.

Closes https://github.com/wxWidgets/wxWidgets/pull/1177
This commit is contained in:
ali kettab
2019-01-25 01:27:57 +01:00
committed by Vadim Zeitlin
parent 515031cf6b
commit 3c369af2e6

View File

@@ -1480,7 +1480,9 @@ bool wxWindowQt::QtHandleContextMenuEvent ( QWidget *WXUNUSED( handler ), QConte
bool wxWindowQt::QtHandleFocusEvent ( QWidget *WXUNUSED( handler ), QFocusEvent *event )
{
wxFocusEvent e( event->gotFocus() ? wxEVT_SET_FOCUS : wxEVT_KILL_FOCUS );
wxFocusEvent e( event->gotFocus() ? wxEVT_SET_FOCUS : wxEVT_KILL_FOCUS, GetId() );
e.SetEventObject(this);
e.SetWindow(event->gotFocus() ? this : FindFocus());
bool handled = ProcessWindowEvent( e );