1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-05 22:52:18 +00:00

-rootwin fixed, keys work, mouse doesn't

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5823 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-04-24 23:10:41 +00:00
parent cac0e913c9
commit e08139aeba
2 changed files with 7 additions and 3 deletions

View File

@ -353,6 +353,7 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
#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 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
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 )

View File

@ -417,11 +417,12 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
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 );