[Wine] World of warcraft HW mouse patch.

ronkkrop wineforum-user at winehq.org
Fri Apr 9 01:15:20 CDT 2010


I was wondering if anybody could help me out.  I found a patch that lets you use a hardware mouse with wow in opengl mode...which is pretty awesome i might add.  This patch is also supposed to hide the mouse cursor when you press the left or right mouse button, the problem being....it does not.   Oddly though, if you press both the left and right mouse button at the same time, it does hide the cursor.


Code:

    Pixmap blank;
    XColor dummy;
    char no_data[1] = {0};
    Cursor cursor;

    char *hwgl;

    if (buttonNum >= NB_BUTTONS) return;
    if (!hwnd) return;

    hwgl = getenv("WINE_CURSOR");

    switch (buttonNum)
    {
    case 0:
        if (hwgl != NULL) {

	//printf("Case 0\n");
	wine_tsx11_lock();
	XUndefineCursor(event->display, event->window);
	blank = XCreateBitmapFromData (event->display, event->window, no_data, 1, 1);
	if(blank == None)
    	WINE_FIXME("Out of memory.\n");
	cursor = XCreatePixmapCursor(event->display, blank, blank, &dummy, &dummy, 0, 0);
	XFreePixmap (event->display, blank);
	XDefineCursor(event->display, event->window, cursor);
	if (event->window)
	{
	    //printf("At the bottom.\n");
    	    XFlush( event->display);
	}	
	wine_tsx11_unlock();
	}
	break;
    case 2:
        if (hwgl != NULL) {
	//printf("Case 2\n");
	wine_tsx11_lock();
	XUndefineCursor(event->display, event->window);
	blank = XCreateBitmapFromData (event->display, event->window, no_data, 1, 1);
	if(blank == None)
    	WINE_FIXME("Out of memory.\n");
	cursor = XCreatePixmapCursor(event->display, blank, blank, &dummy, &dummy, 0, 0);
	XFreePixmap (event->display, blank);
	XDefineCursor(event->display, event->window, cursor);
	if (event->window)
	{
    	    XFlush( event->display);
	}
	wine_tsx11_unlock();
	}
	break;

       .
       .
       .










More information about the wine-users mailing list