head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.2 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.3.0.6 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.4 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.2 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.2.0.2 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.1.0.24 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.22 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.20 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.18 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.16 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.14 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.12 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.10 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.8 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.6 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.4 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.2 pkgsrc-2009Q2-base:1.1; locks; strict; comment @# @; 1.4 date 2013.05.16.05.53.59; author richard; state dead; branches; next 1.3; commitid ZKZV4ZU4ItWULOPw; 1.3 date 2012.09.26.14.11.26; author liamjfoy; state Exp; branches; next 1.2; 1.2 date 2012.05.08.11.20.13; author drochner; state Exp; branches; next 1.1; 1.1 date 2009.05.22.19.05.57; author tnn; state Exp; branches; next ; desc @@ 1.4 log @update to xf86-input-mouse-1.8.1 for modular-xorg-server-1.12.4 @ text @$NetBSD: patch-ac,v 1.3 2012/09/26 14:11:26 liamjfoy Exp $ Changes from NetBSD xsrc/external/mit/xorg-server/dist/\ hw/xfree86/os-support/bsd/bsd_mouse.c ---------------------------- revision 1.5 date: 2009/02/09 09:49:39; author: plunky; state: Exp; lines: +16 -0 add horizontal mouse-wheel functionality to USB and WSMOUSE drivers ---------------------------- revision 1.4 date: 2009/02/02 03:06:37; author: christos; state: Exp; lines: +7 -11 add a SetupMouse proc to condition the fd. Convert NetBSD's SetupAuto to SetupMouse. ---------------------------- revision 1.3 date: 2009/01/19 00:54:29; author: christos; state: Exp; lines: +2 -1 fix ioctl. ---------------------------- revision 1.2 date: 2009/01/13 18:43:46; author: christos; state: Exp; lines: +25 -0 Set the mouse event protocol version. (untested, but head will be broken unless I add this). ---------------------------- Changes from NetBSD xsrc/external/mit/xf86-input-mouse/dist/\ src/bsd_mouse.c ---------------------------- revision 1.3 date: 2012/01/26 23:43:06; author: christos; state: Exp; lines: +25 -1 PR/45853: Pierre Pronchery: Add support for absolute positioning (tablets) ---------------------------- --- src/bsd_mouse.c.orig 2012-03-16 06:34:27.000000000 +0000 +++ src/bsd_mouse.c 2012-09-26 13:26:54.000000000 +0000 @@@@ -53,12 +53,15 @@@@ #define HUP_GENERIC_DESKTOP 0x0001 #define HUP_BUTTON 0x0009 +#define HUP_CONSUMER 0x000c #define HUG_X 0x0030 #define HUG_Y 0x0031 #define HUG_Z 0x0032 #define HUG_WHEEL 0x0038 +#define HUC_AC_PAN 0x0238 + #define HID_USAGE2(p,u) (((p) << 16) | u) /* The UMS mices have middle button as number 3 */ @@@@ -98,7 +101,7 @@@@ static int SupportedInterfaces(void) { #if defined(__NetBSD__) - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO; + return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; #else @@@@ -339,6 +342,23 @@@@ FindDevice(InputInfoPtr pInfo, const cha } #endif +#if defined(__NetBSD__) +static Bool +SetupMouse(InputInfoPtr pInfo) +{ +#ifdef WSCONS_SUPPORT +#ifdef WSMOUSEIO_SETVERSION + int version = WSMOUSE_EVENT_VERSION; + if (ioctl(pInfo->fd, WSMOUSEIO_SETVERSION, &version) == -1) { + xf86Msg(X_WARNING, "%s: cannot set version\n", pInfo->name); + return FALSE; + } +#endif +#endif + return TRUE; +} +#endif + #if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) /* Only support wsmouse configuration for now */ @@@@ -409,7 +429,7 @@@@ wsconsReadInput(InputInfoPtr pInfo) n /= sizeof(struct wscons_event); while( n-- ) { int buttons = pMse->lastButtons; - int dx = 0, dy = 0, dz = 0, dw = 0; + int dx = 0, dy = 0, dz = 0, dw = 0, x, y; switch (event->type) { case WSCONS_EVENT_MOUSE_UP: #define BUTBIT (1 << (event->value <= 2 ? 2 - event->value : event->value)) @@@@ -434,6 +454,30 @@@@ wsconsReadInput(InputInfoPtr pInfo) dw = event->value; break; #endif + case WSCONS_EVENT_MOUSE_ABSOLUTE_X: + miPointerGetPosition (pInfo->dev, &x, &y); + x = event->value; + miPointerSetPosition (pInfo->dev, &x, &y); + xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, x, y); + ++event; + continue; + case WSCONS_EVENT_MOUSE_ABSOLUTE_Y: + miPointerGetPosition (pInfo->dev, &x, &y); + y = event->value; + miPointerSetPosition (pInfo->dev, &x, &y); + xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, x, y); + ++event; + continue; +#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_Z + case WSCONS_EVENT_MOUSE_ABSOLUTE_Z: + ++event; + continue; +#endif +#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_W + case WSCONS_EVENT_MOUSE_ABSOLUTE_W: + ++event; + continue; +#endif default: xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name, event->type); @@@@ -473,7 +517,7 @@@@ typedef struct _UsbMseRec { hid_item_t loc_x; /* x locator item */ hid_item_t loc_y; /* y locator item */ hid_item_t loc_z; /* z (wheel) locator item */ - hid_item_t loc_w; /* z (wheel) locator item */ + hid_item_t loc_w; /* w (pan) locator item */ hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */ unsigned char *buffer; } UsbMseRec, *UsbMsePtr; @@@@ -688,6 +732,9 @@@@ usbPreInit(InputInfoPtr pInfo, const cha if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) { } + if (hid_locate(reportDesc, HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN), + hid_input, &pUsbMse->loc_w, pUsbMse->iid) < 0) { + } #else if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, &pUsbMse->loc_x) < 0) { @@@@ -700,6 +747,9 @@@@ usbPreInit(InputInfoPtr pInfo, const cha if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &pUsbMse->loc_z) < 0) { } + if (hid_locate(reportDesc, HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN), + hid_input, &pUsbMse->loc_w) < 0) { + } #endif /* Probe for number of buttons */ for (i = 1; i <= MSE_MAXBUTTONS; i++) { @@@@ -772,6 +822,9 @@@@ OSMouseInit(int flags) p->SetupAuto = SetupAuto; p->SetMiscRes = SetMouseRes; #endif +#if defined(__NetBSD__) + p->SetupMouse = SetupMouse; +#endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__) p->FindDevice = FindDevice; #endif @ 1.3 log @Fix package to work with uts(4) @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.2 2012/05/08 11:20:13 drochner Exp $ @ 1.2 log @allow use of the wsmouse protocol on NetBSD, bump PKGREV @ text @d1 1 a1 1 $NetBSD$ d26 9 d36 1 a36 1 +++ src/bsd_mouse.c d86 41 a126 1 @@@@ -473,7 +493,7 @@@@ typedef struct _UsbMseRec { d135 1 a135 1 @@@@ -688,6 +708,9 @@@@ usbPreInit(InputInfoPtr pInfo, const cha d145 1 a145 1 @@@@ -700,6 +723,9 @@@@ usbPreInit(InputInfoPtr pInfo, const cha d155 1 a155 1 @@@@ -772,6 +798,9 @@@@ OSMouseInit(int flags) @ 1.1 log @Update to xf86-input-mouse-1.4.0, based on patch from hasso@@ From xorg-announce@@ mail: The big change in 1.4.0 is the move of the OS-specific mouse handling code from the Xorg server to the mouse driver. This code was removed from the Xorg server in the Xorg 1.6 development cycle, so users of non-evdev systems (i.e. non-Linux or pre-evdev Linux) will need this version of the mouse driver to run with Xorg 1.6. Remove useless call to xf86AddModuleInfo Merge some hardware support information from README.mouse into man page Fix sun_mouse.c build on Solaris Rename OS_SOURCES to stop automake complaints about not building program "OS" Remove checks for Solaris x86 versions older than Solaris 8 sun_mouse.c: remove unused variables sun_mouse.c: Use miPointerGetScreen instead of miPointerCurrentScreen Fix solarisMouseAutoProbe to use device name & protocol specified by HAL sun_mouse: check for Device in commonOptions if pInfo->options isn't set yet Replace static changelog with one generated via XORG_CHANGELOG Add XORG_CWARNFLAGS & XORG_WITH_LINT for more compiler checking Clear assorted compiler, sparse & lint warnings sun_mouse: fallback to commonOptions for StreamsModule too Comment typo fixes Remove some #if 1 statements Unifdef XFree86LOADER Add copyright notices for OS mouse code to COPYING file Add note on hal-based configuration to man page Version 1.4.0 Add OS mouse sources to the driver build Change screen private key to an integer variable. Build fix: Add a prototype for FindDevice function. Include xorg-server.h to get the WSCONS_SUPPORT define from prevent a double free of mouse private structure. W axis support for bsd_mouse. Make sure xf86MouseProtocolIDToName is of public visibility. Compile warning fixes. Fix linux build man: Note that the server may probe default "Device" options. Nuke RCS tags. Check for XINPUT ABI 3. fix compilation (upper/lower case typo) @ text @d26 2 a27 2 --- src/bsd_mouse.c.orig 2009-05-19 15:12:28 +0300 +++ src/bsd_mouse.c 2009-05-19 15:13:13 +0300 d44 9 d77 1 a77 1 @@@@ -496,7 +516,7 @@@@ typedef struct _UsbMseRec { d86 1 a86 1 @@@@ -708,6 +728,9 @@@@ usbPreInit(InputInfoPtr pInfo, const cha d96 1 a96 1 @@@@ -720,6 +743,9 @@@@ usbPreInit(InputInfoPtr pInfo, const cha d106 1 a106 1 @@@@ -790,6 +816,9 @@@@ xf86OSMouseInit(int flags) @