Make readEvents() non-blocking
authorPaul Olav Tvete <paul.tvete@nokia.com>
Mon, 11 Apr 2011 12:48:47 +0000 (14:48 +0200)
committerPaul Olav Tvete <paul.tvete@nokia.com>
Mon, 11 Apr 2011 12:55:17 +0000 (14:55 +0200)
commite1b1c019958f345d0e5021fcd33d9a7288f86ee4
tree667c58eef9d43ddcb003e18a16e2fc3f9a27c929
parentbd721a782d903a36e1c2ed6c04f99177827bc158
Make readEvents() non-blocking

Another event handler could empty the Wayland socket after the
socket notifier has triggered, but before the signal is delivered.
Since wl_display_iterate is blocking, we have to test whether there
is data available to avoid freezing the whole application.

Reviewed-by: Samuel
src/plugins/platforms/wayland/qwaylanddisplay.cpp
src/plugins/platforms/wayland/qwaylanddisplay.h
src/plugins/platforms/wayland/qwaylandwindow.cpp