Fix "unresponsible application" issues in Wayland

Polling without wl_display_flush() never responds to ping requests.
In that case ping-pong works only on other events, such as user input
or on frame swapped.

From https://git.merproject.org/mer-core/libsdl/merge_requests/3
Original author: Alexander Akulich <a.akulich@omprussia.ru>
This commit is contained in:
Thomas Perl 2018-08-23 14:47:38 +02:00
parent 568068048f
commit 84e7832018
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,8 @@ Wayland_PumpEvents(_THIS)
{
SDL_VideoData *d = _this->driverdata;
WAYLAND_wl_display_flush(d->display);
if (SDL_IOReady(WAYLAND_wl_display_get_fd(d->display), SDL_FALSE, 0)) {
WAYLAND_wl_display_dispatch(d->display);
}