From b2872866a715999871fd6c74adabda026b96c3ca Mon Sep 17 00:00:00 2001 From: John Klehm Date: Tue, 22 Apr 2008 19:12:06 -0500 Subject: winex11.drv: Always check cursor slots 0 and 1 due to our hack for older apps --- dlls/winex11.drv/wintab.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 37596ba..b23f9bd 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -803,8 +803,13 @@ static void set_button_state(int curnum, XID deviceid) static int cursor_from_device(DWORD deviceid, LPWTI_CURSORS_INFO *cursorp) { int i; - for (i = 0; i < gNumCursors; i++) - if (gSysCursor[i].PHYSID == deviceid) + /* due to our hack supporting old apps expecting cursors in slot 1 + * we have to check at least slot 0 and slot 1 even if there is + * only 1 cursor which would normally be just in slot 0 + * + * i.e. i < 2 will always check slots 0 and 1 */ + for (i = 0; (i < gNumCursors) || (i < 2); i++) + if (gSysCursor[i].PHYSID == deviceid) { *cursorp = &gSysCursor[i]; return i; -- 1.5.4.5