weston-wfits: Subtract 1 from absmax
authorBrian Lovin <brian.j.lovin@intel.com>
Fri, 10 May 2013 19:18:29 +0000 (12:18 -0700)
committerBrian Lovin <brian.j.lovin@intel.com>
Fri, 10 May 2013 19:18:29 +0000 (12:18 -0700)
There seems to be a bug on my Ubuntu 13.04 system where the pointer
is moved to a location that is -1px off on the x and y direction
unless these max values are made smaller. Shouldn't effect tests
on other systems - was tested.

Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
src/extensions/weston/weston-wfits.cpp

index 35c2eb2..2a3cf88 100644 (file)
@@ -376,9 +376,9 @@ create_input(struct wfits* wfits)
         */
        global_size(wfits, &width, &height);
        device.absmin[ABS_X] = 0;
-       device.absmax[ABS_X] = width;
+       device.absmax[ABS_X] = width - 1;
        device.absmin[ABS_Y] = 0;
-       device.absmax[ABS_Y] = height;
+       device.absmax[ABS_Y] = height - 1;
 
        if (write(wfits->input_fd, &device, sizeof(device)) < 0) {
                exit(EXIT_FAILURE);