[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.74,1.75 vo_x11.c,1.93,1.94

Arpi of Ize arpi at mplayerhq.hu
Thu Apr 25 01:10:44 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv29893

Modified Files:
	vo_xv.c vo_x11.c 
Log Message:
-rootwin fixed, keys work, mouse doesn't

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- vo_xv.c	24 Apr 2002 22:49:58 -0000	1.74
+++ vo_xv.c	24 Apr 2002 23:10:41 -0000	1.75
@@ -416,11 +416,12 @@
    vo_x11_classhint( mDisplay,vo_window,"xv" );
    vo_hidecursor(mDisplay,vo_window);
 
-   if(WinID!=0)
-   XSelectInput(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
+   XSelectInput(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | 
+	((WinID==0) ? 0 : (PointerMotionMask
 #ifdef HAVE_NEW_INPUT
 		| ButtonPressMask | ButtonReleaseMask
 #endif
+	))
    );
    XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
    if ( vo_fs ) vo_x11_decoration( mDisplay,vo_window,0 );

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- vo_x11.c	19 Apr 2002 23:13:36 -0000	1.93
+++ vo_x11.c	24 Apr 2002 23:10:41 -0000	1.94
@@ -353,6 +353,7 @@
 #ifdef HAVE_XINERAMA
    vo_x11_xinerama_move(mDisplay,vo_window);
 #endif
+    if(WinID!=0)
     do { XNextEvent( mDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != vo_window );
     XSelectInput( mDisplay,vo_window,NoEventMask );
 
@@ -360,7 +361,9 @@
     XSync( mDisplay,False );
     vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv );
 
-    XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask);
+    // we cannot grab mouse events on root window :(
+    XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | 
+	((WinID==0)?0:(ButtonPressMask | ButtonReleaseMask | PointerMotionMask)) );
 
 #ifdef HAVE_XF86VM
     if ( vm )




More information about the MPlayer-cvslog mailing list