# HG changeset patch # User lgb # Date 987123245 0 # Node ID b0e4e5744899b6f970ba42f8317a454c0304d9bd # Parent 086c66d570d84dec2f94064a34cc72c4517b3077 Autohide X11 cursor diff -r 086c66d570d8 -r b0e4e5744899 libvo/vo_gl.c --- a/libvo/vo_gl.c Thu Apr 12 23:23:29 2001 +0000 +++ b/libvo/vo_gl.c Fri Apr 13 00:54:05 2001 +0000 @@ -183,6 +183,7 @@ mywindow = XCreateWindow(mydisplay, RootWindow(mydisplay,screen), hint.x, hint.y, hint.width, hint.height, 4, vinfo->depth,CopyFromParent,vinfo->visual,xswamask,&xswa); + vo_hidecursor(mydisplay,mywindow); wsGLXContext=glXCreateContext( mydisplay,vinfo,NULL,True ); // XStoreName( wsDisplay,wsMyWin,wsSysName ); diff -r 086c66d570d8 -r b0e4e5744899 libvo/vo_x11.c --- a/libvo/vo_x11.c Thu Apr 12 23:23:29 2001 +0000 +++ b/libvo/vo_x11.c Fri Apr 13 00:54:05 2001 +0000 @@ -225,6 +225,7 @@ hint.x,hint.y, hint.width,hint.height, xswa.border_pixel,depth,CopyFromParent,vinfo.visual,xswamask,&xswa ); + vo_hidecursor(mDisplay,mywindow); if ( fullscreen ) vo_x11_decoration( mDisplay,mywindow,0 ); XSelectInput( mDisplay,mywindow,StructureNotifyMask ); diff -r 086c66d570d8 -r b0e4e5744899 libvo/vo_xmga.c --- a/libvo/vo_xmga.c Thu Apr 12 23:23:29 2001 +0000 +++ b/libvo/vo_xmga.c Fri Apr 13 00:54:05 2001 +0000 @@ -244,6 +244,7 @@ mDepth, InputOutput, vinfo.visual,xswamask,&xWAttribs ); + vo_hidecursor(mDisplay,mWindow); if ( fullscreen ) vo_x11_decoration( mDisplay,mWindow,0 ); diff -r 086c66d570d8 -r b0e4e5744899 libvo/vo_xv.c --- a/libvo/vo_xv.c Thu Apr 12 23:23:29 2001 +0000 +++ b/libvo/vo_xv.c Fri Apr 13 00:54:05 2001 +0000 @@ -138,6 +138,7 @@ mywindow = XCreateWindow(mydisplay, RootWindow(mydisplay,screen), hint.x, hint.y, hint.width, hint.height, 0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa); + vo_hidecursor(mydisplay,mywindow); XSelectInput(mydisplay, mywindow, StructureNotifyMask | KeyPressMask ); XSetStandardProperties(mydisplay, mywindow, hello, hello, None, NULL, 0, &hint); diff -r 086c66d570d8 -r b0e4e5744899 libvo/x11_common.c --- a/libvo/x11_common.c Thu Apr 12 23:23:29 2001 +0000 +++ b/libvo/x11_common.c Fri Apr 13 00:54:05 2001 +0000 @@ -24,6 +24,23 @@ static int dpms_disabled=0; static int timeout_save=0; + +void vo_hidecursor ( Display *disp , Window win ) +{ + Cursor no_ptr; + Pixmap bm_no; + XColor black,dummy; + Colormap colormap; + static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0 }; + + colormap = DefaultColormap(disp,DefaultScreen(disp)); + XAllocNamedColor(disp,colormap,"black",&black,&dummy); + bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8); + no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0); + XDefineCursor(disp,win,no_ptr); +} + + int vo_init( void ) { int CompletionType = -1; diff -r 086c66d570d8 -r b0e4e5744899 libvo/x11_common.h --- a/libvo/x11_common.h Thu Apr 12 23:23:29 2001 +0000 +++ b/libvo/x11_common.h Fri Apr 13 00:54:05 2001 +0000 @@ -9,6 +9,7 @@ extern int vo_dheight; int vo_init( void ); +int vo_hidecursor ( Display* , Window ); void vo_x11_decoration( Display * vo_Display,Window w,int d ); int vo_x11_check_events(Display *mydisplay); #endif