summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2013-05-02 23:24:14 +0200
committerAlexander Preisinger <alexander.preisinger@gmail.com>2013-05-02 23:24:14 +0200
commitf8c13d6b6622f0a06331cbb1cf66b3969fa3618c (patch)
tree4e7db510410529697ec9854fb2fba2d54b55c6a1
parent68d4cc4536dc90d34d3606191dba96a3774e651b (diff)
downloadmpv-f8c13d6b6622f0a06331cbb1cf66b3969fa3618c.tar.bz2
mpv-f8c13d6b6622f0a06331cbb1cf66b3969fa3618c.tar.xz
wayland: fix wrong poll comment, check for errors
We only print an error message when POLLERR or POLLHUP occurrs, as the something did go horribly wrong and the server will either deal with it or crash. Also add POLLOUT to the events.
-rw-r--r--video/out/wayland_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 654f704df8..054619dc83 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -770,16 +770,18 @@ int vo_wayland_check_events (struct vo *vo)
struct pollfd fd = {
wl->display->display_fd,
- POLLIN | POLLERR | POLLHUP,
+ POLLIN | POLLOUT | POLLERR | POLLHUP,
0
};
/* wl_display_dispatch is blocking
- * wl_dipslay_dispatch is non-blocking but does not read from the fd
+ * wl_dipslay_dispatch_pending is non-blocking but does not read from the fd
*
* when pausing no input events get queued so we have to check if there
* are events to read from the file descriptor through poll */
if (poll(&fd, 1, 0) > 0) {
+ if (fd.revents & POLLERR || fd.revents & POLLHUP)
+ mp_msg(MSGT_VO, MSGL_ERR, "[wayland] error occurred on fd\n");
if (fd.revents & POLLIN)
wl_display_dispatch(dp);
if (fd.revents & POLLOUT)