In dmxBackendMouGetInfo() initialize the info->minval[], maxval[] arrays to the size of the backend display.

It seems that the changes to X input exposed a problem that wasn't detected
before.  The axis clipping code in GetPointerEvents() uses those limits to
constrain the pointer's coordinate range.  The max was zero so the pointer
couldn't move.
This commit is contained in:
Brian 2007-04-02 12:41:30 -06:00
parent 0013bf6ddb
commit 0aaf28e563

View File

@ -592,12 +592,16 @@ void dmxBackendInit(DevicePtr pDev)
/** Get information about the backend pointer (for initialization). */
void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
{
const DMXScreenInfo *dmxScreen = dmxBackendInitPrivate(pDev);
info->buttonClass = 1;
dmxCommonMouGetMap(pDev, info->map, &info->numButtons);
info->valuatorClass = 1;
info->numRelAxes = 2;
info->minval[0] = 0;
info->maxval[0] = 0;
info->minval[1] = 0;
info->maxval[0] = dmxScreen->beWidth;
info->maxval[1] = dmxScreen->beHeight;
info->res[0] = 1;
info->minres[0] = 0;
info->maxres[0] = 1;