*************************** begin patchfile ************************************
*** q1src-p/QW/client/gl_vidlinuxglx.c Tue Dec 21 18:45:54 1999
--- gl_vidlinuxglx.c Sat Aug 19 20:47:42 2000
***************
*** 1,22 ****
! /*
! Copyright (C) 1996-1997 Id Software, Inc.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!
! See the GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
!
! */
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
--- 1,22 ----
! /*
! Copyright (C) 1996-1997 Id Software, Inc.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!
! See the GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
!
! */
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
***************
*** 66,71 ****
--- 66,74 ----
static int scr_width, scr_height;
+ /* blank cursor - gets initialized in VID_Init, freed in VID_Shutdown */
+ Cursor cursor;
+
/*-----------------------------------------------------------------------*/
//int texture_mode = GL_NEAREST;
***************
*** 236,243 ****
0,
GrabModeAsync, GrabModeAsync,
win,
! None,
CurrentTime);
#ifdef USE_DGA
XF86DGADirectVideo(dpy, DefaultScreen(dpy), XF86DGADirectMouse);
--- 239,247 ----
0,
GrabModeAsync, GrabModeAsync,
win,
! cursor,
CurrentTime);
+ Con_Printf("Cursor blanked.\n");
#ifdef USE_DGA
XF86DGADirectVideo(dpy, DefaultScreen(dpy), XF86DGADirectMouse);
***************
*** 350,355 ****
--- 354,360 ----
if (!ctx)
return;
+ XFreeCursor(dpy, cursor);
glXDestroyContext(dpy, ctx);
}
***************
*** 602,608 ****
unsigned long mask;
Window root;
XVisualInfo *visinfo;
!
S_Init();
Cvar_RegisterVariable (&vid_mode);
--- 607,617 ----
unsigned long mask;
Window root;
XVisualInfo *visinfo;
! /* vars to make blank cursor */
! Pixmap blank;
! XColor dummy;
! char data[1] = {0};
!
S_Init();
Cvar_RegisterVariable (&vid_mode);
***************
*** 701,706 ****
--- 710,720 ----
Con_SafePrintf ("Video mode %dx%d initialized.\n", width, height);
vid.recalc_refdef = 1; // force a surface cache flush
+
+ blank = XCreateBitmapFromData(dpy, win, data, 1, 1);
+ if(blank == None) fprintf(stderr, "error: out of memory.\n");
+ cursor = XCreatePixmapCursor(dpy, blank, blank, &dummy, &dummy, 0, 0);
+ XFreePixmap(dpy, blank);
}
void Sys_SendKeyEvents(void)
*************************** end patchfile ************************************
|