summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r--video/out/x11_common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index ee19e1be73..a9d6a2a632 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1934,10 +1934,8 @@ void vo_x11_wait_events(struct vo *vo, int64_t until_time_us)
poll(fds, 2, timeout_ms);
- if (fds[1].revents & POLLIN) {
- char buf[100];
- (void)read(x11->wakeup_pipe[0], buf, sizeof(buf)); // flush
- }
+ if (fds[1].revents & POLLIN)
+ mp_flush_wakeup_pipe(x11->wakeup_pipe[0]);
}
static void xscreensaver_heartbeat(struct vo_x11_state *x11)