diff options
author | Jason Gerecke <jason.gerecke@wacom.com> | 2022-01-27 15:15:10 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-04 12:44:09 +1000 |
commit | 44710a571a3399c0b894160abb7480e257a1c441 (patch) | |
tree | 32a174c01ca0d53ca624317d0a04c26966c4f161 | |
parent | d8347da16d2f13a3f0c3c047d080eaeb084fac3a (diff) | |
download | xf86-input-wacom-44710a571a3399c0b894160abb7480e257a1c441.tar.gz |
test: Enforce "zero minimum" workaround only for touch device
The codepath for pen/eraser devices is capable of using the minimum
values. Move the code to enforce a a minimum value of zero to the touch
portion of the function where it applies.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
-rw-r--r-- | src/wcmConfig.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/wcmConfig.c b/src/wcmConfig.c index 3c1e056..3431ba6 100644 --- a/src/wcmConfig.c +++ b/src/wcmConfig.c @@ -1099,14 +1099,12 @@ TEST_CASE(test_initial_size) /* pin to some numbers */ int xres = 1920, yres = 1600; - int minx, maxx = 2 * xres, miny, maxy = 2 * yres; + int minx = 100, maxx = 2 * xres, miny = 200, maxy = 2 * yres; priv.common = &common; - /* FIXME: we currently assume min of 0 in the driver. we cannot cope - * with non-zero devices */ - minx = miny = 0; - + common.wcmMinX = minx; + common.wcmMinY = miny; common.wcmMaxX = maxx; common.wcmMaxY = maxy; common.wcmResolX = xres; @@ -1122,8 +1120,14 @@ TEST_CASE(test_initial_size) assert(priv.resolY == yres); /* Same thing for a touch-enabled device */ + memset(&priv, 0, sizeof(priv)); memset(&common, 0, sizeof(common)); + /* FIXME: we currently assume min of 0 in the driver for touch. + * we cannot cope with non-zero devices */ + minx = miny = 0; + + priv.common = &common; priv.flags = TOUCH_ID; assert(IsTouch(&priv)); |