From 37babdb3a1e78ead92bf25632c7af180c95976ad Mon Sep 17 00:00:00 2001 From: uau Date: Sat, 25 Aug 2007 04:28:17 +0000 Subject: Watch X11 fd in main input select() if using vo xv Add the X11 fd to main input select() set, and call VO check_events() if it becomes readable. Only done in vo xv code for now, though would make sense for other X11-based VOs too. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24153 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libvo') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 76138e9ae2..1a035d5f19 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -39,6 +39,8 @@ Buffer allocation: #include "subopt-helper.h" +#include "input/input.h" + #ifdef HAVE_NEW_GUI #include "gui/interface.h" #endif @@ -713,6 +715,7 @@ static void uninit(void) #ifdef HAVE_XF86VM vo_vm_close(mDisplay); #endif + mp_input_rm_event_fd(ConnectionNumber(mDisplay)); vo_x11_uninit(); } @@ -834,6 +837,7 @@ static int preinit(const char *arg) fo = XvListImageFormats(mDisplay, xv_port, (int *) &formats); + mp_input_add_event_fd(ConnectionNumber(mDisplay), check_events); return 0; } -- cgit v1.2.3