changeset 24133:d43cda21236d

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.
author uau
date Sat, 25 Aug 2007 04:28:17 +0000
parents 9f234010c4be
children e18a800a02e7
files libvo/vo_xv.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Sat Aug 25 04:28:14 2007 +0000
+++ b/libvo/vo_xv.c	Sat Aug 25 04:28:17 2007 +0000
@@ -39,6 +39,8 @@
 
 #include "subopt-helper.h"
 
+#include "input/input.h"
+
 #ifdef HAVE_NEW_GUI
 #include "gui/interface.h"
 #endif
@@ -713,6 +715,7 @@
 #ifdef HAVE_XF86VM
     vo_vm_close(mDisplay);
 #endif
+    mp_input_rm_event_fd(ConnectionNumber(mDisplay));
     vo_x11_uninit();
 }
 
@@ -834,6 +837,7 @@
 
     fo = XvListImageFormats(mDisplay, xv_port, (int *) &formats);
 
+    mp_input_add_event_fd(ConnectionNumber(mDisplay), check_events);
     return 0;
 }