diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-12-14 21:58:47 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-12-14 22:33:12 +0200 |
commit | 4f610adfc29a2aa2f1159ded016ca4f8960c52e9 (patch) | |
tree | 260307218d658564e8430d8c61a12c14b920f804 /libvo/video_out.h | |
parent | 2ba074e613d79600023128974ea60a75251480b5 (diff) | |
download | mpv-4f610adfc29a2aa2f1159ded016ca4f8960c52e9.tar.bz2 mpv-4f610adfc29a2aa2f1159ded016ca4f8960c52e9.tar.xz |
libvo: register X11 connection fd in input event system
Register the X11 connection fd in the input system so that
mp_input_get_cmd() can immediately wake up and handle keyboard or
other X events. The callback calls vo_check_events() and tells the
input system to handle any input possibly recorded during that. Before
this was done for vo_xv only; this commit generalizes it to all VOs
that call vo_x11_create_vo_window() - those are hopefully ones that
will handle all X events in check_events().
The callback is only kept registered while the vo is properly
configured. At other times calling check_events() would not clear
pending input and so could lead to a busy loop.
Diffstat (limited to 'libvo/video_out.h')
-rw-r--r-- | libvo/video_out.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libvo/video_out.h b/libvo/video_out.h index 39ea26a53a..36a161aaf5 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -251,6 +251,8 @@ struct vo { struct vo_x11_state *x11; struct mp_fifo *key_fifo; struct input_ctx *input_ctx; + int event_fd; // check_events() should be called when this has input + int registered_fd; // set to event_fd when registered in input system // requested position/resolution int dx; |