Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
xorg-x11-driver-input
xf86-input-evdev-max_fixes.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xf86-input-evdev-max_fixes.diff of Package xorg-x11-driver-input
--- xf86-input-evdev-1.1.5/src/evdev.h +++ xf86-input-evdev-1.1.5/src/evdev.h @@ -162,12 +162,12 @@ typedef struct { int axes; - int v[ABS_MAX]; + int v[ABS_MAX+1]; int old_x, old_y; int count; - int min[ABS_MAX]; - int max[ABS_MAX]; - int map[ABS_MAX]; + int min[ABS_MAX+1]; + int max[ABS_MAX+1]; + int map[ABS_MAX+1]; int scale[2]; int screen; /* Screen number for this device. */ Bool use_touch; @@ -177,15 +177,15 @@ typedef struct { int axes; - int v[REL_MAX]; + int v[REL_MAX+1]; int count; - int map[REL_MAX]; - int btnMap[REL_MAX][2]; + int map[REL_MAX+1]; + int btnMap[REL_MAX+1][2]; } evdevRelRec, *evdevRelPtr; typedef struct { int axes; - int v[ABS_MAX]; + int v[ABS_MAX+1]; } evdevAxesRec, *evdevAxesPtr; typedef struct { --- xf86-input-evdev-1.1.5/src/evdev_axes.c +++ xf86-input-evdev-1.1.5/src/evdev_axes.c @@ -206,10 +206,10 @@ axes->v[0x3c], axes->v[0x3d], axes->v[0x3e], axes->v[0x3f]); if (!skip_xy) - for (i = 0; i < ABS_MAX; i++) + for (i = 0; i <= ABS_MAX; i++) state->axes->v[i] = 0; else if (skip_xy == 1) - for (i = 2; i < ABS_MAX; i++) + for (i = 2; i <= ABS_MAX; i++) state->axes->v[i] = 0; else if (skip_xy == 2) for (i = 0; i < 2; i++) @@ -224,7 +224,7 @@ struct input_absinfo absinfo; int i; - for (i = 0; i < ABS_MAX; i++) { + for (i = 0; i <= ABS_MAX; i++) { if (!test_bit (i, pEvdev->bits.abs)) continue; @@ -288,7 +288,7 @@ xf86XInputSetScreen (pInfo, state->abs->screen, conv_x, conv_y); } - for (; i < ABS_MAX; i++) + for (; i <= ABS_MAX; i++) state->axes->v[i] = state->abs->v[i]; EvdevAxesRealSyn (pInfo, 1, skip_xy); @@ -306,7 +306,7 @@ if (!state->axes || !state->rel || !state->rel->count) return; - for (i = 0; i < REL_MAX; i++) { + for (i = 0; i <= REL_MAX; i++) { if (rel->btnMap[i][0] || rel->btnMap[i][1]) { if ((rel->v[i] > 0) && (btn = rel->btnMap[i][0])) EvdevBtnPostFakeClicks (pInfo, btn, rel->v[i]); @@ -343,7 +343,7 @@ evdevStatePtr state = &pEvdev->state; int map; - if (ev->code >= ABS_MAX) + if (ev->code > ABS_MAX) return; /* FIXME: Handle inverted axes properly. */ @@ -366,7 +366,7 @@ evdevStatePtr state = &pEvdev->state; int map; - if (ev->code >= REL_MAX) + if (ev->code > REL_MAX) return; map = state->rel->map[ev->code]; @@ -403,7 +403,7 @@ int i, j, k = 0, real_axes; real_axes = 0; - for (i = 0; i < ABS_MAX; i++) + for (i = 0; i <= ABS_MAX; i++) if (test_bit (i, pEvdev->bits.abs)) real_axes++; @@ -419,7 +419,7 @@ pInfo->type_name = XI_MOUSE; pInfo->conversion_proc = EvdevConvert; - for (i = 0, j = 0; i < ABS_MAX; i++) { + for (i = 0, j = 0; i <= ABS_MAX; i++) { if (!test_bit (i, pEvdev->bits.abs)) continue; @@ -444,7 +444,7 @@ } state->abs->axes = real_axes; - for (i = 0; i < ABS_MAX; i++) { + for (i = 0; i <= ABS_MAX; i++) { if (state->abs->map[i] > state->abs->axes) state->abs->axes = state->abs->map[i]; } @@ -525,7 +525,7 @@ int i, j, k = 0, real_axes; real_axes = 0; - for (i = 0; i < REL_MAX; i++) + for (i = 0; i <= REL_MAX; i++) if (test_bit (i, pEvdev->bits.rel)) real_axes++; @@ -542,7 +542,7 @@ pInfo->type_name = XI_MOUSE; pInfo->conversion_proc = EvdevConvert; - for (i = 0, j = 0; i < REL_MAX; i++) { + for (i = 0, j = 0; i <= REL_MAX; i++) { if (!test_bit (i, pEvdev->bits.rel)) continue; @@ -579,7 +579,7 @@ } state->rel->axes = real_axes; - for (i = 0; i < REL_MAX; i++) + for (i = 0; i <= REL_MAX; i++) if (state->rel->map[i] > state->rel->axes) state->rel->axes = state->rel->map[i];
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor