diff --git a/common/vid_x11.c b/common/vid_x11.c index dc5e966..36d45df 100644 --- a/common/vid_x11.c +++ b/common/vid_x11.c @@ -25,17 +25,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _BSD #include -#include +#include +#include +#include +#include #include #include #include #ifdef HAVE_UNISTD_H #include #endif -#include -#include -#include -#include #include #include #include @@ -43,7 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include @@ -57,6 +55,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #ifdef HAVE_STRINGS_H #include @@ -65,21 +64,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. viddef_t vid; // global video state unsigned short d_8to16table[256]; -Window x_win; +Window x_win; static Colormap x_cmap; -static GC x_gc; +static GC x_gc; static Visual *x_vis; static XVisualInfo *x_visinfo; -static Atom aWMDelete = 0; +static Atom aWMDelete = 0; int XShmQueryExtension(Display *); int XShmGetEventBase(Display *); -qboolean doShm; +qboolean doShm; static XShmSegmentInfo x_shminfo[2]; -static int current_framebuffer; +static int current_framebuffer; static XImage *x_framebuffer[2] = { 0, 0 }; static int verbose = 0; @@ -286,32 +285,6 @@ void VID_Gamma_f (void) } } -// ======================================================================== -// makes a null cursor -// ======================================================================== - -static Cursor CreateNullCursor(Display *display, Window root) -{ - Pixmap cursormask; - XGCValues xgc; - GC gc; - XColor dummycolour; - Cursor cursor; - - cursormask = XCreatePixmap(display, root, 1, 1, 1/*depth*/); - xgc.function = GXclear; - gc = XCreateGC(display, cursormask, GCFunction, &xgc); - XFillRectangle(display, cursormask, gc, 0, 0, 1, 1); - dummycolour.pixel = 0; - dummycolour.red = 0; - dummycolour.flags = 04; - cursor = XCreatePixmapCursor(display, cursormask, cursormask, - &dummycolour,&dummycolour, 0,0); - XFreePixmap(display,cursormask); - XFreeGC(display,gc); - return cursor; -} - static void ResetFrameBuffer(void) @@ -604,9 +577,6 @@ void VID_Init (unsigned char *palette) } } -// inviso cursor - XDefineCursor(x_disp, x_win, CreateNullCursor(x_disp, x_win)); - // create the GC { XGCValues xgcvalues;