summaryrefslogtreecommitdiff
path: root/hw/dmx/input
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-02 12:41:30 -0600
committerBrian <brian@yutani.localnet.net>2007-04-02 12:41:30 -0600
commit0aaf28e5633a59563b89a2e42d19fabc84adc3ed (patch)
tree713dec3ca56ab130f5233131561bf68767fea3f8 /hw/dmx/input
parent0013bf6ddb3867c9a504603434d8c2ec83f3f3bc (diff)
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.
Diffstat (limited to 'hw/dmx/input')
-rw-r--r--hw/dmx/input/dmxbackend.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/dmx/input/dmxbackend.c b/hw/dmx/input/dmxbackend.c
index 09a2a324b..315979eab 100644
--- a/hw/dmx/input/dmxbackend.c
+++ b/hw/dmx/input/dmxbackend.c
@@ -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;