Fix "unresponsible application" issues in Wayland
authorThomas Perl <m@thp.io>
Thu, 23 Aug 2018 14:47:38 +0200
changeset 123427cec5c0510ae
parent 12341 fa1df9b103d7
child 12343 84eaa0636bac
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>
src/video/wayland/SDL_waylandevents.c
     1.1 --- a/src/video/wayland/SDL_waylandevents.c	Thu Oct 18 15:41:50 2018 -0700
     1.2 +++ b/src/video/wayland/SDL_waylandevents.c	Thu Aug 23 14:47:38 2018 +0200
     1.3 @@ -178,6 +178,8 @@
     1.4  {
     1.5      SDL_VideoData *d = _this->driverdata;
     1.6  
     1.7 +    WAYLAND_wl_display_flush(d->display);
     1.8 +
     1.9      if (SDL_IOReady(WAYLAND_wl_display_get_fd(d->display), SDL_FALSE, 0)) {
    1.10          WAYLAND_wl_display_dispatch(d->display);
    1.11      }