Call XFlush() after simulating mouse button events too

For some reason, mouse press events were still received without
flushing, but mouse release ones were not received by GTK itself (and a
fortiori by wxGTK) without it.
This commit is contained in:
Vadim Zeitlin
2019-10-15 00:07:38 +02:00
parent 1df0b0ac99
commit f65133a41f

View File

@@ -108,7 +108,12 @@ bool wxUIActionSimulatorX11Impl::SendButtonEvent(int button, bool isDown)
// all pending events, notably mouse moves. // all pending events, notably mouse moves.
XSync(m_display, False /* don't discard */); XSync(m_display, False /* don't discard */);
return DoX11Button(xbutton, isDown); if ( !DoX11Button(xbutton, isDown) )
return false;
XFlush(m_display);
return true;
} }
#if wxUSE_PLAINX_IMPL #if wxUSE_PLAINX_IMPL