From 8b84635c64500dc48ba1785710e0168bd4a1d51f Mon Sep 17 00:00:00 2001 From: lgb Date: Fri, 13 Apr 2001 00:54:05 +0000 Subject: Autohide X11 cursor git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@385 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/x11_common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libvo/x11_common.c') diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 765ad7e237..9402e97e19 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -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; -- cgit v1.2.3