Call XFlush() after simulating key press in wxGTK

This makes simulating keys much more reliable, previously they were just
completely lost (i.e. never resulted in key-press-event signal being
generated by GTK) sometimes.
This commit is contained in:
Vadim Zeitlin
2019-10-12 17:27:05 +02:00
parent 6d6f7cc1ec
commit 6530886d31

View File

@@ -341,7 +341,12 @@ bool wxUIActionSimulatorX11Impl::DoKey(int keycode, int modifiers, bool isDown)
if ( xkeycode == NoSymbol )
return false;
return DoX11Key(xkeycode, modifiers, isDown);
if ( !DoX11Key(xkeycode, modifiers, isDown) )
return false;
XFlush(m_display);
return true;
}
wxUIActionSimulator::wxUIActionSimulator()