From ca893689fefdac74338b41aa21fbc601ae102ff6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 Mar 2013 22:50:09 +0100 Subject: x11_common: fix --cursor-autohide when paused When paused, --cursor-autohide worked with a precision of 500ms, which is the main loop's default sleep time when paused. Cursor hiding is polled in x11_common, and the main loop never called the X11 code at the right time. Fix this by allowing the VO to set a time when it should be called next. --- video/out/vo.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/out/vo.h') diff --git a/video/out/vo.h b/video/out/vo.h index d10d360657..ca252337b1 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -238,6 +238,9 @@ struct vo { double flip_queue_offset; // queue flip events at most this much in advance + unsigned int next_wakeup_time; // deadline for next vo_check_events() call, + // in GetTimerMS() units (set by VO) + const struct vo_driver *driver; void *priv; struct MPOpts *opts; @@ -294,6 +297,7 @@ void vo_new_frame_imminent(struct vo *vo); void vo_draw_osd(struct vo *vo, struct osd_state *osd); void vo_flip_page(struct vo *vo, unsigned int pts_us, int duration); void vo_check_events(struct vo *vo); +unsigned int vo_get_sleep_time(struct vo *vo); void vo_seek_reset(struct vo *vo); void vo_destroy(struct vo *vo); -- cgit v1.2.3