From 1fc509c59162d92657bb57ee9b52ad6f0c5eaff6 Mon Sep 17 00:00:00 2001 From: Koop Mast Date: Sat, 18 Apr 2015 15:34:36 +0000 Subject: Misc X.org port updates: Update gccmakedep to 1.0.3. Update imake to 1.0.7. Update libpciaccess to 0.13.3. Update libdrm to 2.4.60. Update bitmap to 1.0.8. Update fstobdf to 1.0.6. Update iceauth to 1.0.7. Update libXdmcp to 1.1.2. Update libXp to 1.0.3. Update libXvMC to 1.0.9. Update libXxf86vm to 1.1.4. Update libxshmfence to 1.2. Update randrproto to 1.4.1. Update rgb to 1.0.6. Update sessreg to 1.1.0. Update xcb-util-cursor to 0.1.2. Update xedit to 1.2.2. Update xkbcomp to 1.3.0. Update xkeyboard-config to 2.14. Update xproto to 7.0.27. Update xf86-input-mouse to 1.9.1. Update xf86-input-synaptics to 1.8.2. Update xf86-video-i710 to 1.3.5. Update xf86-video-mga to 1.6.4. Update xf86-video-tdfx to 1.4.6. Update xf86-video-vmware to 13.1.0. Update bdftopcf to 1.0.5. Update font-util to 1.3.1. Update fslsfonts to 1.0.5. Update mkfontscale to 1.1.2. Update showfont to 1.0.5. Update xfs to 1.1.4. Update xfsinfo to 1.0.5. Remove :keepla from USES=libtool for X libraries in bsd.xorg.mk, and bump all affected ports. PR: 199400 Obtained from: Xorg-devel repo --- .../xf86-input-mouse/files/patch-src-bsd_mouse.c | 80 ++++++++++------------ 1 file changed, 37 insertions(+), 43 deletions(-) (limited to 'x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c') diff --git a/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c index 1996722fd2eb..f4d39fabf24b 100644 --- a/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c +++ b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c @@ -1,5 +1,5 @@ ---- src/bsd_mouse.c.orig 2012-10-08 03:40:07.000000000 +0200 -+++ src/bsd_mouse.c 2013-07-03 01:00:50.897361950 +0200 +--- src/bsd_mouse.c.orig 2014-08-12 06:36:34 UTC ++++ src/bsd_mouse.c @@ -26,6 +26,24 @@ * authorization from the copyright holder(s) and author(s). */ @@ -59,7 +59,7 @@ #define HUP_GENERIC_DESKTOP 0x0001 #define HUP_BUTTON 0x0009 -@@ -75,11 +104,13 @@ +@@ -75,11 +104,13 @@ static const char *FindDevice(InputInfoP #define DEFAULT_MOUSE_DEV "/dev/mouse" #define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse" #define DEFAULT_PS2_DEV "/dev/psm0" @@ -73,20 +73,16 @@ NULL }; #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) -@@ -100,7 +131,11 @@ - #if defined(__NetBSD__) - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO; - #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -- return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; -+ return MSE_SERIAL | MSE_BUS | MSE_PS2 | -+#ifdef XPS2_SUPPORT -+ MSE_XPS2 | -+#endif -+ MSE_AUTO | MSE_MISC; +@@ -97,7 +128,7 @@ static const char *mouseDevs[] = { + static int + SupportedInterfaces(void) + { +-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__NetBSD__) ++#if defined(__NetBSD__) + return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; #else return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO | MSE_MISC; - #endif -@@ -180,9 +215,30 @@ +@@ -178,9 +209,30 @@ static struct { { MOUSE_PROTO_SYSMOUSE, "SysMouse" } }; @@ -117,7 +113,7 @@ int i; mousehw_t hw; mousemode_t mode; -@@ -190,7 +246,13 @@ +@@ -188,7 +240,13 @@ SetupAuto(InputInfoPtr pInfo, int *proto if (pInfo->fd == -1) return NULL; @@ -131,7 +127,7 @@ i = 1; ioctl(pInfo->fd, MOUSE_SETLEVEL, &i); -@@ -209,9 +271,18 @@ +@@ -207,9 +265,18 @@ SetupAuto(InputInfoPtr pInfo, int *proto protoPara[0] = mode.syncmask[0]; protoPara[1] = mode.syncmask[1]; } @@ -152,7 +148,7 @@ } } } -@@ -234,41 +305,41 @@ +@@ -232,41 +299,41 @@ SetSysMouseRes(InputInfoPtr pInfo, const (protocol && xf86NameCmp(protocol, "SysMouse") == 0)) { /* * As the FreeBSD sysmouse driver defaults to protocol level 0 @@ -211,7 +207,7 @@ } return FALSE; } -@@ -276,17 +347,17 @@ +@@ -274,17 +341,17 @@ MousedRunning(void) static const char * FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) { @@ -233,7 +229,7 @@ #endif } else { /* -@@ -295,28 +366,32 @@ +@@ -293,28 +360,32 @@ FindDevice(InputInfoPtr pInfo, const cha * the test for whether /dev/sysmouse is usable can be made. */ if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) { @@ -279,7 +275,7 @@ break; } } -@@ -468,30 +543,78 @@ +@@ -486,30 +557,78 @@ wsconsPreInit(InputInfoPtr pInfo, const #if defined(USBMOUSE_SUPPORT) @@ -366,7 +362,7 @@ switch (what) { case DEVICE_INIT: -@@ -500,38 +623,96 @@ +@@ -518,38 +637,96 @@ usbMouseProc(DeviceIntPtr pPointer, int for (nbuttons = 0; nbuttons < MSE_MAXBUTTONS; ++nbuttons) map[nbuttons + 1] = nbuttons + 1; @@ -486,7 +482,7 @@ } pMse->lastButtons = 0; pMse->lastMappedButtons = 0; -@@ -553,6 +734,7 @@ +@@ -571,6 +748,7 @@ usbMouseProc(DeviceIntPtr pPointer, int xf86CloseSerial(pInfo->fd); pInfo->fd = -1; } @@ -494,7 +490,7 @@ pPointer->public.on = FALSE; usleep(300000); break; -@@ -568,45 +750,154 @@ +@@ -586,45 +764,154 @@ usbReadInput(InputInfoPtr pInfo) { MouseDevPtr pMse; UsbMsePtr pUsbMse; @@ -551,11 +547,6 @@ - dy = hid_get_data(pBuf, &pUsbMse->loc_y); - dz = hid_get_data(pBuf, &pUsbMse->loc_z); - dw = hid_get_data(pBuf, &pUsbMse->loc_w); -- -- buttons = 0; -- for (n = 0; n < pMse->buttons; n++) { -- if (hid_get_data(pBuf, &pUsbMse->loc_btn[n])) -- buttons |= (1 << UMS_BUT(n)); + for (nacol = 0; nacol < pUsbMse->nacols; nacol++) { + acol = &pUsbMse->acols[nacol]; + if (acol->pInfo == NULL) @@ -565,7 +556,11 @@ + dx = dy = dz = dw = dp = 0; + for (nlcol = 0; nlcol < pUsbMse->acols[nacol].nlcols; nlcol++) { + lcol = &acol->lcols[nlcol]; -+ + +- buttons = 0; +- for (n = 0; n < pMse->buttons; n++) { +- if (hid_get_data(pBuf, &pUsbMse->loc_btn[n])) +- buttons |= (1 << UMS_BUT(n)); + if (lcol->loc_valid.usage != 0 && rid == lcol->loc_valid.report_ID && + hid_get_data(pBuf, &lcol->loc_valid) == 0) + continue; @@ -671,7 +666,7 @@ } static void -@@ -615,14 +906,17 @@ +@@ -633,14 +920,17 @@ usbSigioReadInput (int fd, void *closure usbReadInput ((InputInfoPtr) closure); } @@ -692,7 +687,7 @@ pUsbMse = malloc(sizeof(UsbMseRec)); if (pUsbMse == NULL) { -@@ -631,12 +925,7 @@ +@@ -649,12 +939,7 @@ usbPreInit(InputInfoPtr pInfo, const cha return FALSE; } @@ -706,7 +701,7 @@ /* Check if the device can be opened. */ pInfo->fd = xf86OpenSerial(pInfo->options); -@@ -652,19 +941,134 @@ +@@ -670,19 +955,134 @@ usbPreInit(InputInfoPtr pInfo, const cha } /* Get USB informations */ reportDesc = hid_get_report_desc(pInfo->fd); @@ -716,13 +711,6 @@ - xf86Msg(X_ERROR, "Error ioctl USB_GET_REPORT_ID on %s : %s\n", - pInfo->name, strerror(errno)); - return FALSE; -- } -- pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, -- pUsbMse->iid); --#else -- pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, -- &pUsbMse->iid); --#endif + mdepth = 0; + pUsbMse->nacols = 0; + acol = &pUsbMse->acols[pUsbMse->nacols]; @@ -842,7 +830,13 @@ + default: + break; + } -+ } + } +- pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, +- pUsbMse->iid); +-#else +- pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, +- &pUsbMse->iid); +-#endif + if (lcolused) + acol->nlcols++; + if (acolused) @@ -854,7 +848,7 @@ /* Allocate buffer */ if (pUsbMse->packetSize <= 8) { pUsbMse->buffer = pMse->protoBuf; -@@ -674,56 +1078,129 @@ +@@ -692,56 +1092,129 @@ usbPreInit(InputInfoPtr pInfo, const cha if (pUsbMse->buffer == NULL) { xf86Msg(X_ERROR, "%s: cannot allocate buffer\n", pInfo->name); free(pUsbMse); @@ -1021,7 +1015,7 @@ /* Setup the local procs. */ pInfo->device_control = usbMouseProc; pInfo->read_input = usbReadInput; -@@ -766,7 +1243,9 @@ +@@ -784,7 +1257,9 @@ OSMouseInit(int flags) p->CheckProtocol = CheckProtocol; #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE) p->SetupAuto = SetupAuto; -- cgit v1.2.3