X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fglut%2Fminiglut.c;fp=src%2Fglut%2Fminiglut.c;h=b098651be44ff8af71b67805bb1f2a4e10c4d5a9;hp=eb639466b4d204e4d9e311d4c9363df6cb3614a5;hb=2e6bc96b25ae3ad5be7f04934be01f63dfd23ce2;hpb=44c040966c76d856a55cdb2e411a47f91d1780a1 diff --git a/src/glut/miniglut.c b/src/glut/miniglut.c index eb63946..b098651 100644 --- a/src/glut/miniglut.c +++ b/src/glut/miniglut.c @@ -40,6 +40,7 @@ static Atom xa_net_wm_state, xa_net_wm_state_fullscr; static Atom xa_motif_wm_hints; static Atom xa_motion_event, xa_button_press_event, xa_button_release_event, xa_command_event; static unsigned int evmask; +static Cursor blank_cursor; static int have_netwm_fullscr(void); @@ -111,6 +112,9 @@ static int modstate; void glutInit(int *argc, char **argv) { #ifdef BUILD_X11 + Pixmap blankpix = 0; + XColor xcol; + if(!(dpy = XOpenDisplay(0))) { panic("Failed to connect to the X server\n"); } @@ -131,6 +135,11 @@ void glutInit(int *argc, char **argv) evmask = ExposureMask | StructureNotifyMask; + if((blankpix = XCreateBitmapFromData(dpy, root, (char*)&blankpix, 1, 1))) { + blank_cursor = XCreatePixmapCursor(dpy, blankpix, blankpix, &xcol, &xcol, 0, 0); + XFreePixmap(dpy, blankpix); + } + #endif #ifdef BUILD_WIN32 WNDCLASSEX wc = {0}; @@ -779,7 +788,8 @@ void glutSetCursor(int cidx) case GLUT_CURSOR_INHERIT: break; case GLUT_CURSOR_NONE: - /* TODO */ + cur = blank_cursor; + break; default: return; }