Autohide X11 cursor

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@385 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
lgb 2001-04-13 00:54:05 +00:00
parent 9daf9a82ba
commit 8b84635c64
6 changed files with 22 additions and 0 deletions

View File

@ -183,6 +183,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
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 );

View File

@ -225,6 +225,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
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 );

View File

@ -244,6 +244,7 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_
mDepth,
InputOutput,
vinfo.visual,xswamask,&xWAttribs );
vo_hidecursor(mDisplay,mWindow);
if ( fullscreen ) vo_x11_decoration( mDisplay,mWindow,0 );

View File

@ -138,6 +138,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t
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);

View File

@ -24,6 +24,23 @@ int vo_dheight=0;
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;

View File

@ -9,6 +9,7 @@ extern int vo_dwidth;
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