diff options
author | wm4 <wm4@nowhere> | 2013-03-02 22:50:09 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-03 15:36:56 +0100 |
commit | ca893689fefdac74338b41aa21fbc601ae102ff6 (patch) | |
tree | dfab3405dffcf5327e8f624e7205bb36e3a066d4 /video/out/vo.h | |
parent | 9efe32120b4d5aaa88eccf4767fa7d7c5c700fd1 (diff) | |
download | mpv-ca893689fefdac74338b41aa21fbc601ae102ff6.tar.bz2 mpv-ca893689fefdac74338b41aa21fbc601ae102ff6.tar.xz |
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.
Diffstat (limited to 'video/out/vo.h')
-rw-r--r-- | video/out/vo.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |