Date: Wed, 1 Nov 2017 22:30:36 +0000 (UTC) From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325297 - in head/sys/dev: syscons vt Message-ID: <201711012230.vA1MUaPh053878@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wulf Date: Wed Nov 1 22:30:36 2017 New Revision: 325297 URL: https://svnweb.freebsd.org/changeset/base/325297 Log: sysmouse(4): Fix ums(4)-style T-axis reporting via evdev protocol - Do not report T-axis wheel events as button presses - Reverse T-axis to match Linux - Remove wrong comment. T-axis buttons state should be checked by level not by edge to allow continuous wheel tilt reporting Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12676 Modified: head/sys/dev/syscons/sysmouse.c head/sys/dev/vt/vt_sysmouse.c Modified: head/sys/dev/syscons/sysmouse.c ============================================================================== --- head/sys/dev/syscons/sysmouse.c Wed Nov 1 22:19:19 2017 (r325296) +++ head/sys/dev/syscons/sysmouse.c Wed Nov 1 22:30:36 2017 (r325297) @@ -107,11 +107,11 @@ smdev_evdev_write(int x, int y, int z, int buttons) } break; case EVDEV_SYSMOUSE_T_AXIS_UMS: - /* XXX: Edge triggering should be used here */ - if (buttons & (1 << 5)) + if (buttons & (1 << 6)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1); - else if (buttons & (1 << 6)) + else if (buttons & (1 << 5)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1); + buttons &= ~((1 << 5)|(1 << 6)); /* PASSTHROUGH */ case EVDEV_SYSMOUSE_T_AXIS_NONE: default: Modified: head/sys/dev/vt/vt_sysmouse.c ============================================================================== --- head/sys/dev/vt/vt_sysmouse.c Wed Nov 1 22:19:19 2017 (r325296) +++ head/sys/dev/vt/vt_sysmouse.c Wed Nov 1 22:30:36 2017 (r325297) @@ -139,11 +139,11 @@ sysmouse_evdev_store(int x, int y, int z, int buttons) } break; case EVDEV_SYSMOUSE_T_AXIS_UMS: - /* XXX: Edge triggering should be used here */ - if (buttons & (1 << 5)) + if (buttons & (1 << 6)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1); - else if (buttons & (1 << 6)) + else if (buttons & (1 << 5)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1); + buttons &= ~((1 << 5)|(1 << 6)); /* PASSTHROUGH */ case EVDEV_SYSMOUSE_T_AXIS_NONE: default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711012230.vA1MUaPh053878>