Commit 04279d18 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

The NVIDIA graphics device comes up as an X extension event, but

throws an error (BadMatch) when querying for the buttons. Catch this error and and discard that device from being a tablet device.
parent c935908e
......@@ -277,6 +277,11 @@ sym_not_found:
return 0;
}
static int Tablet_ErrorHandler(Display *dpy, XErrorEvent *event, void* arg)
{
return 1;
}
void X11DRV_LoadTabletInfo(HWND hwnddefault)
{
struct x11drv_thread_data *data = x11drv_thread_data();
......@@ -368,7 +373,15 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
int i;
int shft = 0;
X11DRV_expect_error(data->display,Tablet_ErrorHandler,NULL);
pXGetDeviceButtonMapping(data->display, opendevice, map, 32);
if (X11DRV_check_error())
{
TRACE("No buttons, Non Tablet Device\n");
pXCloseDevice(data->display, opendevice);
cursor_target --;
continue;
}
for (i=0; i< cursor->BUTTONS; i++,shft++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment