diff options
author | 2016-02-10 05:49:50 +0000 | |
---|---|---|
committer | 2016-02-10 05:49:50 +0000 | |
commit | 690400d3a84eff62a3d9164cf1a1f82b77c659b3 (patch) | |
tree | e1d3b77009cf4d77ebca1664f289cfb68f5baf23 /sys | |
parent | protect the bpf ring with splnet as well as the kernel lock. (diff) | |
download | wireguard-openbsd-690400d3a84eff62a3d9164cf1a1f82b77c659b3.tar.xz wireguard-openbsd-690400d3a84eff62a3d9164cf1a1f82b77c659b3.zip |
Permit negative x and y coordinates in mouse.scale for uts and ums.
Needed by some touchscreens.
no objection matthieu@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/hid/hidms.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/uts.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/hid/hidms.c b/sys/dev/hid/hidms.c index e52c3cb7622..bc9b39d4fc8 100644 --- a/sys/dev/hid/hidms.c +++ b/sys/dev/hid/hidms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hidms.c,v 1.1 2016/01/08 15:54:13 jcs Exp $ */ +/* $OpenBSD: hidms.c,v 1.2 2016/02/10 05:49:50 guenther Exp $ */ /* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -429,8 +429,8 @@ hidms_ioctl(struct hidms *ms, u_long cmd, caddr_t data, int flag, switch (cmd) { case WSMOUSEIO_SCALIBCOORDS: - if (!(wsmc->minx >= 0 && wsmc->maxx >= 0 && - wsmc->miny >= 0 && wsmc->maxy >= 0 && + if (!(wsmc->minx >= -32768 && wsmc->maxx >= -32768 && + wsmc->miny >= -32768 && wsmc->maxy >= -32768 && wsmc->resx >= 0 && wsmc->resy >= 0 && wsmc->minx < 32768 && wsmc->maxx < 32768 && wsmc->miny < 32768 && wsmc->maxy < 32768 && diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c index 0c83fe7189a..cc13d844f33 100644 --- a/sys/dev/usb/uts.c +++ b/sys/dev/usb/uts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uts.c,v 1.36 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: uts.c,v 1.37 2016/02/10 05:49:50 guenther Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -325,8 +325,8 @@ uts_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *l) switch (cmd) { case WSMOUSEIO_SCALIBCOORDS: - if (!(wsmc->minx >= 0 && wsmc->maxx >= 0 && - wsmc->miny >= 0 && wsmc->maxy >= 0 && + if (!(wsmc->minx >= -32768 && wsmc->maxx >= 0 && + wsmc->miny >= -32768 && wsmc->maxy >= 0 && wsmc->resx >= 0 && wsmc->resy >= 0 && wsmc->minx < 32768 && wsmc->maxx < 32768 && wsmc->miny < 32768 && wsmc->maxy < 32768 && |