COPYING | 1 Makefile.am | 8 autogen.sh | 4 configure.ac | 17 include/Makefile.am | 1 include/xf86-mouse-properties.h | 33 man/mousedrv.man | 25 src/Makefile.am | 5 src/bsd_mouse.c | 536 ++-- src/compat-api.h | 98 src/hurd_mouse.c | 118 - src/lnx_mouse.c | 180 - src/mouse.c | 4372 ++++++++++++++++++++-------------------- src/mouse.h | 255 +- src/mousePriv.h | 50 src/pnp.c | 566 ++--- src/sun_mouse.c | 627 ++--- xorg-mouse.pc.in | 6 18 files changed, 3598 insertions(+), 3304 deletions(-)
New commits: commit 35cae8f4352002c8dce85dbc86cebb50e915a478 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Mar 27 10:59:05 2013 +1000 mouse 1.9.0 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/configure.ac b/configure.ac index 110ee32..ee6a345 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-mouse], - [1.8.1], + [1.9.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-mouse]) AC_CONFIG_SRCDIR([Makefile.am]) commit 585f4030d77accf2a4ba115729ca08da82217863 Author: Colin Walters <walt...@verbum.org> Date: Wed Jan 4 17:37:06 2012 -0500 autogen.sh: Implement GNOME Build API http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/autogen.sh b/autogen.sh index 904cd67..fc34bd5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,6 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode "$@" +if test -z "$NOCONFIGURE"; then + $srcdir/configure "$@" +fi commit 8e74b1db7b32a2a2bb668a8edc6757cc5b77157a Author: Adam Jackson <a...@redhat.com> Date: Wed Jan 16 13:11:11 2013 -0500 configure: Drop AM_MAINTAINER_MODE Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/configure.ac b/configure.ac index 6576c8e..110ee32 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,6 @@ AC_CONFIG_AUX_DIR(.) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE # Initialize libtool AC_DISABLE_STATIC commit 3b199a175da8485c216ccccb68df4cf539899619 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Aug 15 14:38:28 2012 +1000 Use signal-safe logging if available Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Chase Douglas <chase.doug...@ubuntu.com> diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c index 441066f..ca4c9d0 100644 --- a/src/bsd_mouse.c +++ b/src/bsd_mouse.c @@ -435,8 +435,9 @@ wsconsReadInput(InputInfoPtr pInfo) break; #endif default: - xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name, - event->type); + LogMessageVerbSigSafe(X_WARNING, -1, + "%s: bad wsmouse event type=%d\n", pInfo->name, + event->type); ++event; continue; } @@ -584,8 +585,9 @@ usbReadInput(InputInfoPtr pInfo) if (n == 0) return; if (n != pUsbMse->packetSize) { - xf86Msg(X_WARNING, "%s: incomplete packet, size %d\n", pInfo->name, - n); + LogMessageVerbSigSafe(X_WARNING, -1, + "%s: incomplete packet, size %d\n", + pInfo->name, n); } /* discard packets with an id that don't match the mouse */ /* XXX this is probably not the right thing */ diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c index 16ae945..2b0d786 100644 --- a/src/hurd_mouse.c +++ b/src/hurd_mouse.c @@ -122,7 +122,7 @@ OsMouseReadInput(InputInfoPtr pInfo) dy = - event->value.mmotion.mm_deltaY; break; default: - ErrorF("Bad mouse event (%d)\n",event->type); + LogMessageVerbSigSafe(X_ERROR, -1, "Bad mouse event (%d)\n",event->type); continue; } pMse->PostEvent(pInfo, buttons, dx, dy, 0, 0); diff --git a/src/mouse.c b/src/mouse.c index b65ea0e..0487067 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1167,7 +1167,7 @@ MouseReadInput(InputInfoPtr pInfo) u = (unsigned char)c; #if defined (EXTMOUSEDEBUG) || defined (MOUSEDATADEBUG) - ErrorF("mouse byte: %2.2x\n",u); + LogMessageVerbSigSafe(X_INFO, -1, "mouse byte: %x\n",u); #endif /* if we do autoprobing collect the data */ @@ -1225,7 +1225,7 @@ MouseReadInput(InputInfoPtr pInfo) * preceeding the byte. */ #ifdef EXTMOUSEDEBUG - ErrorF("mouse 4th byte %02x\n",u); + LogMessageVerbSigSafe(X_INFO, -1, "mouse 4th byte %x\n",u); #endif dx = dy = dz = dw = 0; buttons = 0; @@ -1275,10 +1275,10 @@ MouseReadInput(InputInfoPtr pInfo) #ifdef EXTMOUSEDEBUG2 { int i; - ErrorF("received %d bytes",pBufP); + LogMessageVerbSigSafe(X_INFO, -1, "received %d bytes",pBufP); for ( i=0; i < pBufP; i++) - ErrorF(" %02x",pBuf[i]); - ErrorF("\n"); + LogMessageVerbSigSafe(X_INFO, -1, " %x",pBuf[i]); + LogMessageVerbSigSafe(X_INFO, -1, "\n"); } #endif @@ -1353,11 +1353,11 @@ MouseReadInput(InputInfoPtr pInfo) if ((pBuf[0] & pMse->protoPara[0]) != pMse->protoPara[1] || baddata) { if (pMse->inSync) { #ifdef EXTMOUSEDEBUG - ErrorF("mouse driver lost sync\n"); + LogMessageVerbSigSafe(X_INFO, -1, "mouse driver lost sync\n"); #endif } #ifdef EXTMOUSEDEBUG - ErrorF("skipping byte %02x\n",*pBuf); + LogMessageVerbSigSafe(X_INFO, -1, "skipping byte %x\n",*pBuf); #endif /* Tell auto probe that we are out of sync */ if (pMse->autoProbeMouse && pMse->autoProbe) @@ -1374,7 +1374,7 @@ MouseReadInput(InputInfoPtr pInfo) if (!pMse->inSync) { #ifdef EXTMOUSEDEBUG - ErrorF("mouse driver back in sync\n"); + LogMessageVerbSigSafe(X_INFO, -1, "mouse driver back in sync\n"); #endif pMse->inSync = 1; } @@ -1616,20 +1616,20 @@ MouseReadInput(InputInfoPtr pInfo) default: /* There's a table error */ #ifdef EXTMOUSEDEBUG - ErrorF("mouse table error\n"); + LogMessageVerbSigSafe(X_INFO, -1, "mouse table error\n"); #endif continue; } #ifdef EXTMOUSEDEBUG - ErrorF("packet"); + LogMessageVerbSigSafe(X_INFO, -1, "packet"); for ( j=0; j < pBufP; j++) - ErrorF(" %02x",pBuf[j]); - ErrorF("\n"); + LogMessageVerbSigSafe(X_INFO, -1, " %x",pBuf[j]); + LogMessageVerbSigSafe(X_INFO, -1, "\n"); #endif post_event: #ifdef EXTMOUSEDEBUG - ErrorF("dx=%i dy=%i dz=%i dw=%i buttons=%x\n",dx,dy,dz,dw,buttons); + LogMessageVerbSigSafe(X_INFO, -1, "dx=%i dy=%i dz=%i dw=%i buttons=%x\n",dx,dy,dz,dw,buttons); #endif /* When auto-probing check if data makes sense */ if (pMse->checkMovements && pMse->autoProbe) @@ -2005,7 +2005,7 @@ buttonTimer(InputInfoPtr pInfo) xf86PostButtonEvent(pInfo->dev, 0, abs(id), (id >= 0), 0, 0); pMse->emulateState = stateTab[pMse->emulateState][4][2]; } else { - ErrorF("Got unexpected buttonTimer in state %d\n", pMse->emulateState); + LogMessageVerbSigSafe(X_WARNING, -1, "Got unexpected buttonTimer in state %d\n", pMse->emulateState); } xf86UnblockSIGIO (sigstate); @@ -2046,7 +2046,7 @@ Emulate3ButtonsSoft(InputInfoPtr pInfo) if (!pMse->emulate3ButtonsSoft) return TRUE; - xf86Msg(X_INFO,"3rd Button detected: disabling emulate3Button\n"); + LogMessageVerbSigSafe(X_INFO, 4, "mouse: 3rd Button detected: disabling emulate3Button\n"); Emulate3ButtonsSetEnabled(pInfo, FALSE); @@ -3003,7 +3003,7 @@ mouseReset(InputInfoPtr pInfo, unsigned char val) mousepriv->lastEvent = GetTimeInMillis(); #ifdef EXTMOUSEDEBUG - ErrorF("byte: 0x%x time: %li\n",val,mousepriv->lastEvent); + LogMessageVerbSigSafe(X_INFO, -1, "byte: 0x%x time: %li\n",val,mousepriv->lastEvent); #endif /* * We believe that the following is true: @@ -3031,7 +3031,7 @@ mouseReset(InputInfoPtr pInfo, unsigned char val) mousepriv->inReset = FALSE; #ifdef EXTMOUSEDEBUG - ErrorF("Mouse Current: %i 0x%x\n",mousepriv->current, val); + LogMessageVerbSigSafe(X_INFO, -1, "Mouse Current: %i 0x%x\n",mousepriv->current, val); #endif /* here we put the mouse specific reset detection */ @@ -3054,7 +3054,7 @@ mouseReset(InputInfoPtr pInfo, unsigned char val) mousepriv->expires = GetTimeInMillis() + 1000; #ifdef EXTMOUSEDEBUG - ErrorF("Found PS/2 Reset string\n"); + LogMessageVerbSigSafe(X_INFO, -1, "Found PS/2 Reset string\n"); #endif RegisterBlockAndWakeupHandlers (ps2BlockHandler, ps2WakeupHandler, (pointer) pInfo); diff --git a/src/mouse.h b/src/mouse.h index 0b3f709..e1165f2 100644 --- a/src/mouse.h +++ b/src/mouse.h @@ -38,6 +38,9 @@ #define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options)) #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18 +#define LogMessageVerbSigSafe LogMessageVerb +#endif /* Mouse interface classes */ #define MSE_NONE 0x00 diff --git a/src/sun_mouse.c b/src/sun_mouse.c index a291c19..16434e6 100644 --- a/src/sun_mouse.c +++ b/src/sun_mouse.c @@ -303,21 +303,23 @@ vuidReadInput(InputInfoPtr pInfo) case EINTR: /* Interrupted, try again */ continue; case ENODEV: /* May happen when USB mouse is unplugged */ - /* We use X_NONE here because it doesn't alloc since we - may be called from SIGIO handler */ - xf86MsgVerb(X_NONE, 0, - "%s: Device no longer present - removing.\n", - pInfo->name); + /* We use X_NONE here because it didn't alloc since we + may be called from SIGIO handler. No longer true for + sigsafe logging, but matters for older servers */ + LogMessageVerbSigSafe(X_NONE, 0, + "%s: Device no longer present - removing.\n", + pInfo->name); xf86RemoveEnabledDevice(pInfo); pVuidMse->remove_timer = TimerSet(pVuidMse->remove_timer, 0, 1, vuidRemoveMouse, pInfo); return; default: /* All other errors */ - /* We use X_NONE here because it doesn't alloc since we - may be called from SIGIO handler */ - xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, - strerror(errno)); + /* We use X_NONE here because it didn't alloc since we + may be called from SIGIO handler. No longer true for + sigsafe logging, but matters for older servers */ + LogMessageVerbSigSafe(X_NONE, 0, "%s: Read error: %s\n", + pInfo->name, strerror(errno)); return; } } else if (n != sizeof(Firm_event)) { @@ -326,8 +328,8 @@ vuidReadInput(InputInfoPtr pInfo) } #ifdef DEBUG - ErrorF("vuidReadInput: event type: %3d value: %5d\n", - pVuidMse->event.id, pVuidMse->event.value); + LogMessageVerbSigSafe("vuidReadInput: event type: %d value: %d\n", + pVuidMse->event.id, pVuidMse->event.value); #endif if (pVuidMse->event.id >= BUT_FIRST && pVuidMse->event.id <= BUT_LAST) { @@ -417,15 +419,16 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse) } while ( (result != 0) && (errno == EINTR) ); if (result != 0) { - xf86Msg(X_WARNING, - "%s: couldn't set absolute mouse scaling resolution: %s\n", - pInfo->name, strerror(errno)); + LogMessageVerbSigSafe(X_WARNING, -1, + "%s: couldn't set absolute mouse scaling resolution: %s\n", + pInfo->name, strerror(errno)); #ifdef DEBUG } else { - xf86Msg(X_INFO, - "%s: absolute mouse scaling resolution set to %d x %d\n", - pInfo->name, - pVuidMse->absres.width, pVuidMse->absres.height); + LogMessageVerbSigSafe(X_INFO, + "%s: absolute mouse scaling resolution set to %d x %d\n", + pInfo->name, + pVuidMse->absres.width, + pVuidMse->absres.height); #endif } } commit cb1f60930bdc8121e5d7b9210f9491d1116d6aef Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Aug 15 14:43:14 2012 +1000 Fix compilation error with EXTMOUSEDEBUG on pInfo->atom was removed in xorg-server-1.9.0-26-g9802cca Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/mouse.c b/src/mouse.c index 719b1fa..b65ea0e 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1723,8 +1723,7 @@ MouseProc(DeviceIntPtr device, int what) xf86InitValuatorDefaults(device, 1); #ifdef EXTMOUSEDEBUG - ErrorF("assigning %p atom=%d name=%s\n", device, pInfo->atom, - pInfo->name); + ErrorF("assigning %p name=%s\n", device, pInfo->name); #endif MouseInitProperties(device); break; commit 29dbd85c4617a062d2003e0673806b92f8397492 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Tue Jul 31 09:39:38 2012 +1000 xf86-input-mouse 1.8.1 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/configure.ac b/configure.ac index be23aa5..6576c8e 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-mouse], - [1.8.0], + [1.8.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-mouse]) AC_CONFIG_SRCDIR([Makefile.am]) commit 5a5f41659d4e43330407fa8895710c865d2b5328 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Mon Jul 30 15:56:18 2012 -0700 Fix compiler warning in sun_mouse.c (Solaris-only) sun_mouse.c: In function 'vuidRemoveMouse': sun_mouse.c:150:42: warning: declaration of 'time' shadows a global declaration Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/sun_mouse.c b/src/sun_mouse.c index db1a4ae..a291c19 100644 --- a/src/sun_mouse.c +++ b/src/sun_mouse.c @@ -147,7 +147,7 @@ VuidMsePtr getVuidMsePriv(InputInfoPtr pInfo) list or changing pInfo->fd while xf86Wakeup is looping through the list causes server crashes */ static CARD32 -vuidRemoveMouse(OsTimerPtr timer, CARD32 time, pointer arg) +vuidRemoveMouse(OsTimerPtr timer, CARD32 now, pointer arg) { InputInfoPtr pInfo = (InputInfoPtr) arg; commit 5748979008acafd1a8b28f47e292ed6a9706474c Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Tue Jul 31 08:28:27 2012 +1000 Rename xf86-mouse.pc to xorg-mouse.pc Other input drivers already shipping pkgconfig files use this naming scheme and since the 1.8 release didn't install the file anyway, renaming is still acceptable at this point. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/Makefile.am b/Makefile.am index 77e9962..7142485 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,7 @@ SUBDIRS = include src man MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = xf86-mouse.pc +pkgconfig_DATA = xorg-mouse.pc .PHONY: ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index 5f7062d..be23aa5 100644 --- a/configure.ac +++ b/configure.ac @@ -88,7 +88,7 @@ DRIVER_NAME=mouse AC_SUBST([DRIVER_NAME]) AC_CONFIG_FILES([Makefile - xf86-mouse.pc + xorg-mouse.pc include/Makefile src/Makefile man/Makefile]) diff --git a/xf86-mouse.pc.in b/xf86-mouse.pc.in deleted file mode 100644 index 561aa66..0000000 --- a/xf86-mouse.pc.in +++ /dev/null @@ -1,6 +0,0 @@ -sdkdir=@sdkdir@ - -Name: xf86-mouse -Description: X.Org mouse input driver for non-evdev OS'es -Version: @PACKAGE_VERSION@ -Cflags: -I${sdkdir} diff --git a/xorg-mouse.pc.in b/xorg-mouse.pc.in new file mode 100644 index 0000000..2a77e7c --- /dev/null +++ b/xorg-mouse.pc.in @@ -0,0 +1,6 @@ +sdkdir=@sdkdir@ + +Name: xorg-mouse +Description: X.Org mouse input driver for non-evdev OS'es +Version: @PACKAGE_VERSION@ +Cflags: -I${sdkdir} commit a5630a5668793e3bdc6190b5e2ee22d7c28dda0c Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Mon Jul 30 09:06:49 2012 +1000 Install xf86-mouse.pc file Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Jeremy Huddleston <jerem...@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/Makefile.am b/Makefile.am index 01da486..77e9962 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,9 @@ SUBDIRS = include src man MAINTAINERCLEANFILES = ChangeLog INSTALL +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xf86-mouse.pc + .PHONY: ChangeLog INSTALL INSTALL: commit 7c1e63ef00777553cca66781b8db0272bd405db0 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Mon Jul 30 15:53:22 2012 +1000 Fix compiler warnings pnp.c: In function 'probePs2ProtocolPnP': pnp.c:711:31: warning: declaration of 'seq' shadows a previous local [-Wshadow] pnp.c:705:23: warning: shadowed declaration is here [-Wshadow] mouse.c: In function 'MouseCommonOptions': mouse.c:330:13: warning: declaration of 'i' shadows a previous local [-Wshadow] mouse.c:279:9: warning: shadowed declaration is here [-Wshadow] mouse.c: In function 'autoProbeMouse': mouse.c:3602:29: warning: declaration of 'proto' shadows a global declaration [-Wshadow] mouse.c:2482:22: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Jeremy Huddleston Sequoia <jerem...@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/mouse.c b/src/mouse.c index 70ea7fb..719b1fa 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -327,7 +327,7 @@ MouseCommonOptions(InputInfoPtr pInfo) int lock; /* lock button */ int target; /* target button */ int lockM,targetM; /* bitmasks for drag lock, target */ - int i, j; /* indexes */ + int j; /* indexes */ char *s1; /* parse input string */ DragLockPtr pLock; @@ -3599,14 +3599,14 @@ autoProbeMouse(InputInfoPtr pInfo, Bool inSync, Bool lostSync) } case AUTOPROBE_SWITCH_PROTOCOL: { - MouseProtocolID proto; + MouseProtocolID prot; MouseProtocolPtr pProto; void *defaults; AP_DBG(("State SWITCH_PROTOCOL\n")); - proto = mPriv->protoList[mPriv->protocolID++]; - if (proto == PROT_UNKNOWN) + prot = mPriv->protoList[mPriv->protocolID++]; + if (prot == PROT_UNKNOWN) mPriv->autoState = AUTOPROBE_SWITCHSERIAL; - else if (!((pProto = GetProtocol(proto)) && + else if (!((pProto = GetProtocol(prot)) && ((defaults = pProto->defaults))) || (mPriv->serialDefaultsNum == -1 && (defaults == msDefaults)) @@ -3614,8 +3614,8 @@ autoProbeMouse(InputInfoPtr pInfo, Bool inSync, Bool lostSync) && serialDefaultsList[mPriv->serialDefaultsNum] == defaults)) { AP_DBG(("Changing Protocol to %s\n", - ProtocolIDToName(proto))); - SetMouseProto(pMse,proto); + ProtocolIDToName(prot))); + SetMouseProto(pMse,prot); FlushButtons(pMse); RESET_VALIDATION; mPriv->autoState = AUTOPROBE_VALIDATE2; diff --git a/src/pnp.c b/src/pnp.c index 6eba24d..e5c4bc7 100644 --- a/src/pnp.c +++ b/src/pnp.c @@ -708,8 +708,8 @@ probePs2ProtocolPnP(InputInfoPtr pInfo) u = ps2GetDeviceID(pInfo); if (u == 0x03) { /* found IntelliMouse now try IntelliExplorer */ - unsigned char seq[] = { 243, 200, 243, 200, 243, 80 }; - if (ps2SendPacket(pInfo,seq,sizeof(seq))) { + unsigned char im_seq[] = { 243, 200, 243, 200, 243, 80 }; + if (ps2SendPacket(pInfo,im_seq,sizeof(im_seq))) { u = ps2GetDeviceID(pInfo); if (u == 0x04) ret = PROT_EXPPS2; commit 3c0c022672324286b0e936977ca267c6b04dc0f2 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Thu Jul 26 23:10:47 2012 -0700 xf86-input-mouse 1.8.0 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/configure.ac b/configure.ac index 4e50a53..5f7062d 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-mouse], - [1.7.2], + [1.8.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-mouse]) AC_CONFIG_SRCDIR([Makefile.am]) commit 66792aff9562a3cd69576739e4dae116edb31efd Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Wed Jul 25 22:12:02 2012 -0700 Fix vuidMouseAdjustFrame to build with Xorg 1.13 ABI Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/COPYING b/COPYING index 844bdb1..d834c59 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,6 @@ Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates. All rights reserved. +Copyright 2012 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/src/Makefile.am b/src/Makefile.am index 910949e..aad8d0e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -39,6 +39,7 @@ OS_SRCS = bsd_mouse.c hurd_mouse.c lnx_mouse.c sun_mouse.c mouse.h \ pnp.c \ mousePriv.h \ + compat-api.h \ @OS_MOUSE_NAME@_mouse.c EXTRA_DIST = $(OS_SRCS) diff --git a/src/compat-api.h b/src/compat-api.h new file mode 100644 index 0000000..d4d3882 --- /dev/null +++ b/src/compat-api.h @@ -0,0 +1,98 @@ +/* + * Copyright 2012 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Dave Airlie <airl...@redhat.com> + */ + +/* this file provides API compat between server post 1.13 and pre it, + it should be reused inside as many drivers as possible */ +#ifndef COMPAT_API_H +#define COMPAT_API_H + +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p +#endif + +#ifndef XF86_HAS_SCRN_CONV +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] +#endif + +#ifndef XF86_SCRN_INTERFACE + +#define SCRN_ARG_TYPE int +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] + +#define SCREEN_ARG_TYPE int +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] + +#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen + +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags +#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 + +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags +#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 + +#define FREE_SCREEN_ARGS_DECL int arg, int flags + +#define VT_FUNC_ARGS_DECL int arg, int flags +#define VT_FUNC_ARGS pScrn->scrnIndex, 0 + +#define SCRN_OR_INDEX_ARG(x) ((x)->scrnIndex) +#else +#define SCRN_ARG_TYPE ScrnInfoPtr +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) + +#define SCREEN_ARG_TYPE ScreenPtr +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) + +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS pScreen + +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y + +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode +#define SWITCH_MODE_ARGS(arg, m) arg, m +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg + +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg +#define VT_FUNC_ARGS pScrn + +#define SCRN_OR_INDEX_ARG(x) (x) + +#endif + +#endif diff --git a/src/sun_mouse.c b/src/sun_mouse.c index fe27400..db1a4ae 100644 --- a/src/sun_mouse.c +++ b/src/sun_mouse.c @@ -112,8 +112,10 @@ static int vuidMouseProc(DeviceIntPtr pPointer, int what); static void vuidReadInput(InputInfoPtr pInfo); #ifdef HAVE_ABSOLUTE_MOUSE_SCALING +# include "compat-api.h" + static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse); -static void vuidMouseAdjustFrame(int index, int x, int y, int flags); +static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL); static int vuidMouseGeneration = 0; @@ -429,19 +431,19 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse) } } -static void vuidMouseAdjustFrame(int index, int x, int y, int flags) +static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[index]; - ScreenPtr pScreen = pScrn->pScreen; + SCRN_INFO_PTR(arg); + ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86AdjustFrameProc *wrappedAdjustFrame = (xf86AdjustFrameProc *) vuidMouseGetScreenPrivate(pScreen); VuidMsePtr m; ScreenPtr ptrCurScreen; - if(wrappedAdjustFrame) { - pScrn->AdjustFrame = wrappedAdjustFrame; - (*pScrn->AdjustFrame)(index, x, y, flags); - pScrn->AdjustFrame = vuidMouseAdjustFrame; + if (wrappedAdjustFrame) { + pScrn->AdjustFrame = wrappedAdjustFrame; + (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y)); + pScrn->AdjustFrame = vuidMouseAdjustFrame; } for (m = vuidMouseList; m != NULL ; m = m->next) { commit a2494e6fe3168b03f2ebc7d584db0256657c891f Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Mon Jul 23 22:11:57 2012 -0700 Raise bar for xorg-server to 1.7 for XINPUT ABI 7 Not all of the button label settings were wrapped in ABI #ifdefs, so just drop all #ifdefs for GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Jeremy Huddleston Sequoia <jerem...@apple.com> diff --git a/configure.ac b/configure.ac index ba55829..4e50a53 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ XORG_DEFAULT_OPTIONS XORG_WITH_LINT # Obtain compiler/linker options from server and required extensions -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto inputproto) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, diff --git a/src/mouse.c b/src/mouse.c index 7d1ee1b..70ea7fb 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1673,10 +1673,8 @@ MouseProc(DeviceIntPtr device, int what) mousePrivPtr mPriv; unsigned char map[MSE_MAXBUTTONS + 1]; int i; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 Atom btn_labels[MSE_MAXBUTTONS] = {0}; Atom axes_labels[2] = { 0, 0 }; -#endif pInfo = device->public.devicePrivate; pMse = pInfo->private; @@ -1693,29 +1691,21 @@ MouseProc(DeviceIntPtr device, int what) for (i = 0; i < MSE_MAXBUTTONS; i++) map[i + 1] = i + 1; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 MouseInitButtonLabels(btn_labels); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); -#endif InitPointerDeviceStruct((DevicePtr)device, map, min(pMse->buttons, MSE_MAXBUTTONS), -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 btn_labels, -#endif pMse->Ctrl, - GetMotionHistorySize(), 2 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - , axes_labels -#endif + GetMotionHistorySize(), 2, + axes_labels ); /* X valuator */ xf86InitValuatorAxisStruct(device, 0, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 axes_labels[0], -#endif -1, -1, 1, 0, 1 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 , Relative @@ -1724,9 +1714,7 @@ MouseProc(DeviceIntPtr device, int what) xf86InitValuatorDefaults(device, 0); /* Y valuator */ xf86InitValuatorAxisStruct(device, 1, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 axes_labels[1], -#endif -1, -1, 1, 0, 1 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 , Relative commit 88e90dde7a5ffff67da9e091e59c09f2a0828582 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Mon Apr 30 20:36:40 2012 -0700 Expand tabs to spaces Existing code had a mix of places tab & space characters were used. Make them all spaces for consistency, since that's the new style chosen for xorg-server. "git diff -w" shows no changes - this is pure whitespace adjustment. Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c index 2acd6f3..441066f 100644 --- a/src/bsd_mouse.c +++ b/src/bsd_mouse.c @@ -72,25 +72,25 @@ static const char *FindDevice(InputInfoPtr, const char *, int); #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) /* These are for FreeBSD and DragonFly */ -#define DEFAULT_MOUSE_DEV "/dev/mouse" -#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse" -#define DEFAULT_PS2_DEV "/dev/psm0" +#define DEFAULT_MOUSE_DEV "/dev/mouse" +#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse" +#define DEFAULT_PS2_DEV "/dev/psm0" static const char *mouseDevs[] = { - DEFAULT_MOUSE_DEV, - DEFAULT_SYSMOUSE_DEV, - DEFAULT_PS2_DEV, - NULL + DEFAULT_MOUSE_DEV, + DEFAULT_SYSMOUSE_DEV, + DEFAULT_PS2_DEV, + NULL }; #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) /* Only wsmouse mices are autoconfigured for now on OpenBSD */ -#define DEFAULT_WSMOUSE_DEV "/dev/wsmouse" -#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0" +#define DEFAULT_WSMOUSE_DEV "/dev/wsmouse" +#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0" static const char *mouseDevs[] = { - DEFAULT_WSMOUSE_DEV, - DEFAULT_WSMOUSE0_DEV, - NULL + DEFAULT_WSMOUSE_DEV, + DEFAULT_WSMOUSE0_DEV, + NULL }; #endif @@ -109,12 +109,12 @@ SupportedInterfaces(void) /* Names of protocols that are handled internally here. */ static const char *internalNames[] = { #if defined(WSCONS_SUPPORT) - "WSMouse", + "WSMouse", #endif #if defined(USBMOUSE_SUPPORT) - "usb", + "usb", #endif - NULL + NULL }; /* @@ -123,9 +123,9 @@ static const char *internalNames[] = { */ static const char *miscNames[] = { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - "SysMouse", + "SysMouse", #endif - NULL + NULL }; static const char ** @@ -140,11 +140,11 @@ CheckProtocol(const char *protocol) int i; for (i = 0; internalNames[i]; i++) - if (xf86NameCmp(protocol, internalNames[i]) == 0) - return TRUE; + if (xf86NameCmp(protocol, internalNames[i]) == 0) + return TRUE; for (i = 0; miscNames[i]; i++) - if (xf86NameCmp(protocol, miscNames[i]) == 0) - return TRUE; + if (xf86NameCmp(protocol, miscNames[i]) == 0) + return TRUE; return FALSE; } @@ -162,22 +162,22 @@ DefaultProtocol(void) #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE) static struct { - int dproto; - const char *name; + int dproto; + const char *name; } devproto[] = { - { MOUSE_PROTO_MS, "Microsoft" }, - { MOUSE_PROTO_MSC, "MouseSystems" }, - { MOUSE_PROTO_LOGI, "Logitech" }, -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1v0twn-0007iz...@vasks.debian.org