Skip to content

Commit

Permalink
Fix "unresponsible application" issues in Wayland
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thp committed Aug 23, 2018
1 parent 5680680 commit 84e7832
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/wayland/SDL_waylandevents.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 84e7832

Please sign in to comment.