[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-mouse: Changes to 'upstream-unstable'



 configure.ac    |    6 ++
 src/bsd_mouse.c |   26 ++++++++++-
 src/mouse.c     |  122 +++++++++++++++++++++++++++++++++++++++-----------------
 src/sun_mouse.c |   42 +++++++++++++++----
 4 files changed, 147 insertions(+), 49 deletions(-)

New commits:
commit 6886084b192e681739fc55892f30681efb4f79f0
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Aug 11 23:36:23 2014 -0700

    xf86-input-mouse 1.9.1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 6c40988..15d9047 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-mouse],
-        [1.9.0],
+        [1.9.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-mouse])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 252b15a2aeab5d7c843271caf4852df03d7a25eb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jul 11 19:47:20 2014 -0700

    Update some outdated language in a comment on obsolete hardware
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/mouse.c b/src/mouse.c
index 9cb8da6..f9f874b 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -2660,7 +2660,7 @@ SetupMouse(InputInfoPtr pInfo)
 **
 ** NOTE: There are different versions of both MouseMan and TrackMan!
 **       Hence I add another protocol PROT_LOGIMAN, which the user can
-**       specify as MouseMan in his XF86Config file. This entry was
+**       specify as MouseMan in an xorg.conf file. This entry was
 **       formerly handled as a special case of PROT_MS. However, people
 **       who don't have the middle button problem, can still specify
 **       Microsoft and use PROT_MS.

commit e83991474e9964917ea6ece5ad21d1bf56481dfa
Author: Michael Thayer <michael.thayer@oracle.com>
Date:   Thu Apr 24 10:32:17 2014 +0200

    Make absolute input reporting in Solaris aware of resolution changes
    
    Currently on Solaris absolute input reporting only takes resolution changes
    into account when the video driver is using the pre-RandR 1.2 APIs, and
    there it uses the physical resolution, not the virtual.  This patch fixes
    those two things.
    
    Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 16434e6..b092374 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -57,6 +57,7 @@
 #include "mouse.h"
 #include "xisb.h"
 #include "mipointer.h"
+#include "xf86Crtc.h"
 #include <sys/stropts.h>
 #include <sys/vuid_event.h>
 #include <sys/msio.h>
@@ -405,14 +406,11 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse)
     ScrnInfoPtr pScr = XF86SCRNINFO(pScreen);
     int result;
 
-    if (!pScr->currentMode)
-        return;
-
-    if ((pVuidMse->absres.width != pScr->currentMode->HDisplay) ||
-        (pVuidMse->absres.height != pScr->currentMode->VDisplay))
+    if ((pVuidMse->absres.width != pScr->virtualX) ||
+        (pVuidMse->absres.height != pScr->virtualY))
     {
-        pVuidMse->absres.width = pScr->currentMode->HDisplay;
-        pVuidMse->absres.height = pScr->currentMode->VDisplay;
+        pVuidMse->absres.width = pScr->virtualX;
+        pVuidMse->absres.height = pScr->virtualY;
 
         do {
             result = ioctl(pInfo->fd, MSIOSRESOLUTION, &(pVuidMse->absres));
@@ -457,6 +455,24 @@ static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL)
           }
       }
 }
+
+static void vuidMouseCrtcNotify(ScreenPtr pScreen)
+{
+    xf86_crtc_notify_proc_ptr wrappedCrtcNotify
+        = (xf86_crtc_notify_proc_ptr) vuidMouseGetScreenPrivate(pScreen);
+    VuidMsePtr       m;
+    ScreenPtr        ptrCurScreen;
+
+    if (wrappedCrtcNotify)
+        wrappedCrtcNotify(pScreen);
+
+    for (m = vuidMouseList; m != NULL ; m = m->next) {
+        ptrCurScreen = miPointerGetScreen(m->pInfo->dev);
+        if (ptrCurScreen == pScreen) {
+            vuidMouseSendScreenSize(pScreen, m);
+        }
+    }
+}
 #endif /* HAVE_ABSOLUTE_MOUSE_SCALING */
 
 
@@ -492,8 +508,16 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
                 for (i = 0; i < screenInfo.numScreens; i++) {
                     ScreenPtr pScreen = screenInfo.screens[i];
                     ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
-                    vuidMouseSetScreenPrivate(pScreen, pScrn->AdjustFrame);
-                    pScrn->AdjustFrame = vuidMouseAdjustFrame;
+                    if (xf86CrtcConfigPrivateIndex != -1) {
+                        xf86_crtc_notify_proc_ptr pCrtcNotify
+                            = xf86_wrap_crtc_notify(pScreen,
+                                                    vuidMouseCrtcNotify);
+                        vuidMouseSetScreenPrivate(pScreen, pCrtcNotify);
+                    } else {
+                        vuidMouseSetScreenPrivate(pScreen,
+                                                  pScrn->AdjustFrame);
+                        pScrn->AdjustFrame = vuidMouseAdjustFrame;
+                    }
                 }
             vuidMouseGeneration = serverGeneration;
         }

commit 7a1fb986cc5ace474b6f040179bd130d4ba6f78f
Author: Michael Thayer <michael.thayer@oracle.com>
Date:   Mon Mar 31 11:21:12 2014 +0200

    Do not drop the result of protocol detection
    
    In MousePickProtocol() with protocol PROT_AUTO we probe for the protocol to
    use but drop the result in most cases.  This was causing DEVICE_INIT and
    DEVICE_ON to fail to be called with the VUID protocol.  Git history suggests
    that this code was originally meant to cover both PS/2 auto-detection and OS-
    specific detection, but that only the first case was implemented at the time.
    Now that only the second is needed dropping the result to keep the protocol
    as PROT_AUTO is presumably no longer useful and seems to actively breaking
    things.
    
    Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/mouse.c b/src/mouse.c
index 139e1cd..9cb8da6 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -849,11 +849,8 @@ MousePickProtocol(InputInfoPtr pInfo, const char* device,
     {
         const char *osProt;
         if (osInfo->SetupAuto && (osProt = osInfo->SetupAuto(pInfo,NULL))) {
-            MouseProtocolID id = ProtocolNameToID(osProt);
-            if (id == PROT_UNKNOWN || id == PROT_UNSUP) {
-                protocolID = id;
-                protocol = osProt;
-            }
+            protocolID = ProtocolNameToID(osProt);
+            protocol = osProt;
         }
     }
 

commit 4e79eb64e50bf19d984a27af1dedaa78c1e77072
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Mon Aug 19 19:30:37 2013 +0200

    Add support for absolute positioning (tablets).
    
    From Pierre Pronchery <khorben@NetBSD.org>
    and review comments by Daniel Stone <daniel@fooishbar.org>.
    
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index 98e5ff3..a2c8ec7 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -407,7 +407,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))
@@ -432,6 +432,26 @@ wsconsReadInput(InputInfoPtr pInfo)
             dw = event->value;
             break;
 #endif
+	case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
+	    x = event->value;
+	    xf86PostMotionEvent(pInfo->dev, TRUE, 0, 1, x);
+	    ++event;
+	    continue;
+	case WSCONS_EVENT_MOUSE_ABSOLUTE_Y:
+	    y = event->value;
+	    xf86PostMotionEvent(pInfo->dev, TRUE, 1, 1, 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:
             LogMessageVerbSigSafe(X_WARNING, -1,
                                   "%s: bad wsmouse event type=%d\n", pInfo->name,

commit b77a728904d5492163728762d4f363554edefba5
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Mon Aug 19 11:14:33 2013 +0200

    For wsmouse, keep 3-button emulation status.
    
    With a multiplexed device like wsmouse it does not make sense to
    kill emulate3buttons on the first button-3-pressed event. The
    button-3 pressed may belong to a mouse long gone and leave the
    internal (two button only) mousepad useless.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    From Martin Husemann <martin@NetBSD.org>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

diff --git a/src/mouse.c b/src/mouse.c
index 0c7fc63..139e1cd 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -2082,12 +2082,23 @@ Emulate3ButtonsSoft(InputInfoPtr pInfo)
     if (!pMse->emulate3ButtonsSoft)
         return TRUE;
 
+#if defined(__NetBSD__) && defined(WSCONS_SUPPORT)
+    /*
+     * On NetBSD a wsmouse is a multiplexed device. Imagine a notebook
+     * with two-button mousepad, and an external USB mouse plugged in
+     * temporarily. After using button 3 on the external mouse and
+     * unplugging it again, the mousepad will still need to emulate
+     * 3 buttons.
+     */
+    return TRUE;
+#else
     LogMessageVerbSigSafe(X_INFO, 4,
         "mouse: 3rd Button detected: disabling emulate3Button\n");
 
     Emulate3ButtonsSetEnabled(pInfo, FALSE);
 
     return FALSE;
+#endif
 }
 
 static void MouseBlockHandler(pointer data,

commit ae1a3d6072fea65a8a594f2614f47c43dd8dd267
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Mon Aug 19 11:14:32 2013 +0200

    Make wsmouse (re-)init the version.
    
    This makes sure that the xserver and the mouse speak the same
    protocol version.
    
    Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    From Matthew R. Green <mrg@NetBSD.org>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

diff --git a/src/mouse.c b/src/mouse.c
index 2da2b4d..0c7fc63 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -67,6 +67,12 @@
 #include "xserver-properties.h"
 #include "xf86-mouse-properties.h"
 
+#ifdef __NetBSD__
+#include <time.h>
+#include <dev/wscons/wsconsio.h>
+#include <sys/ioctl.h>
+#endif
+
 #include "compiler.h"
 
 #include "xisb.h"
@@ -1757,6 +1763,11 @@ MouseProc(DeviceIntPtr device, int what)
         if (pInfo->fd == -1)
             xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
         else {
+#if defined(__NetBSD__) && defined(WSCONS_SUPPORT) && defined(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);
+#endif
             if (pMse->xisbscale)
                 pMse->buffer = XisbNew(pInfo->fd, pMse->xisbscale * 4);
             else

commit e2cb94b0f3f555f4b1744d63caa587c804f942a2
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Mon Aug 19 11:14:30 2013 +0200

    Enable MSE_MISC on NetBSD as well.
    
    Otherwise we can't find WSMouse.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    From Matthew R. Green <mrg@NetBSD.org>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index ca4c9d0..98e5ff3 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -97,9 +97,7 @@ static const char *mouseDevs[] = {
 static int
 SupportedInterfaces(void)
 {
-#if defined(__NetBSD__)
-    return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || 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;

commit ea504b225f7cbedced9466bbf09ebfa43f39dcfb
Author: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Date:   Sun Jan 5 18:57:28 2014 +0100

    Add AC_SYSTEM_EXTENSIONS to expose asprintf with GNU libc
    
    As required by the following commit:
    commit 8c75f6e1c117f3d05f0bc7bed34f0e7e933f3b9a
    Use asprintf (or Xprintf on old servers) instead of strdup+sprintf
    
    Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index bd782a5..6c40988 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,7 @@ AC_INIT([xf86-input-mouse],
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR(.)
+AC_USE_SYSTEM_EXTENSIONS
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])

commit 8c75f6e1c117f3d05f0bc7bed34f0e7e933f3b9a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Oct 19 21:49:57 2013 -0700

    Use asprintf (or Xprintf on old servers) instead of strdup+sprintf
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index ee6a345..bd782a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,9 @@ XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 XORG_WITH_LINT
 
+# Checks for library functions
+AC_CHECK_FUNCS([asprintf])
+
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto inputproto)
 
diff --git a/src/mouse.c b/src/mouse.c
index f60d6c2..2da2b4d 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -74,6 +74,13 @@
 #include "mousePriv.h"
 #include "mipointer.h"
 
+/* Xorg >= 1.10 provides an asprintf() implementation even if libc doesn't */
+#include "xorgVersion.h"
+#if defined(HAVE_ASPRINTF) || \
+    (XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,10,0,0,0))
+# define USE_ASPRINTF
+#endif
+
 enum {
     /* number of bits in mapped nibble */
     NIB_BITS=4,
@@ -441,20 +448,27 @@ MouseCommonOptions(InputInfoPtr pInfo)
         } else if (sscanf(s, "%d %d %d %d", &b1, &b2, &b3, &b4) >= 2 &&
                  b1 > 0 && b1 <= MSE_MAXBUTTONS &&
                  b2 > 0 && b2 <= MSE_MAXBUTTONS) {
-            msg = xstrdup("buttons XX and YY");
-            if (msg)
-                sprintf(msg, "buttons %d and %d", b1, b2);
             pMse->negativeZ = 1 << (b1-1);
             pMse->positiveZ = 1 << (b2-1);
             if (b3 > 0 && b3 <= MSE_MAXBUTTONS &&
                 b4 > 0 && b4 <= MSE_MAXBUTTONS) {
-                if (msg)
-                    free(msg);
-                msg = xstrdup("buttons XX, YY, ZZ and WW");
-                if (msg)
-                    sprintf(msg, "buttons %d, %d, %d and %d", b1, b2, b3, b4);
                 pMse->negativeW = 1 << (b3-1);
                 pMse->positiveW = 1 << (b4-1);
+#ifdef USE_ASPRINTF
+                if (asprintf(&msg, "buttons %d, %d, %d and %d",
+                             b1, b2, b3, b4) == -1)
+                    msg = NULL;
+#else
+                msg = Xprintf("buttons %d, %d, %d and %d", b1, b2, b3, b4);
+#endif
+            }
+            else {
+#ifdef USE_ASPRINTF
+                if (asprintf(&msg, "buttons %d and %d", b1, b2) == -1)
+                    msg = NULL;
+#else
+                msg = Xprintf("buttons %d and %d", b1, b2);
+#endif
             }
             if (b1 > pMse->buttons) pMse->buttons = b1;
             if (b2 > pMse->buttons) pMse->buttons = b2;
@@ -509,9 +523,12 @@ MouseCommonOptions(InputInfoPtr pInfo)
             if ((sscanf(s, "%d %d", &b1, &b2) == 2) &&
                  b1 > 0 && b1 <= MSE_MAXBUTTONS &&
                  b2 > 0 && b2 <= MSE_MAXBUTTONS) {
-                msg = xstrdup("buttons XX and YY");
-                if (msg)
-                    sprintf(msg, "buttons %d and %d", b1, b2);
+#ifdef USE_ASPRINTF
+                if (asprintf(&msg, "buttons %d and %d", b1, b2) == -1)
+                    msg = NULL;
+#else
+                msg = Xprintf("buttons %d and %d", b1, b2);
+#endif
                 pMse->negativeX = b1;
                 pMse->positiveX = b2;
                 if (b1 > pMse->buttons) pMse->buttons = b1;
@@ -534,9 +551,12 @@ MouseCommonOptions(InputInfoPtr pInfo)
             if ((sscanf(s, "%d %d", &b1, &b2) == 2) &&
                  b1 > 0 && b1 <= MSE_MAXBUTTONS &&
                  b2 > 0 && b2 <= MSE_MAXBUTTONS) {
-                msg = xstrdup("buttons XX and YY");
-                if (msg)
-                    sprintf(msg, "buttons %d and %d", b1, b2);
+#ifdef USE_ASPRINTF
+                if (asprintf(&msg, "buttons %d and %d", b1, b2) == -1)
+                    msg = NULL;
+#else
+                msg = Xprintf("buttons %d and %d", b1, b2);
+#endif
                 pMse->negativeY = b1;
                 pMse->positiveY = b2;
                 if (b1 > pMse->buttons) pMse->buttons = b1;
@@ -606,9 +626,12 @@ MouseCommonOptions(InputInfoPtr pInfo)
         if ((sscanf(s, "%d %d", &b1, &b2) == 2) &&
             (b1 > 0) && (b1 <= MSE_MAXBUTTONS) &&
             (b2 > 0) && (b2 <= MSE_MAXBUTTONS)) {
-            msg = xstrdup("buttons XX and YY");
-            if (msg)
-                sprintf(msg, "buttons %d and %d", b1, b2);
+#ifdef USE_ASPRINTF
+            if (asprintf(&msg, "buttons %d and %d", b1, b2) == -1)
+                msg = NULL;
+#else
+            msg = Xprintf("buttons %d and %d", b1, b2);
+#endif
             pMse->doubleClickTargetButton = b1;
             pMse->doubleClickTargetButtonMask = 1 << (b1 - 1);
             pMse->doubleClickSourceButtonMask = 1 << (b2 - 1);

commit d5de178fe9c20351ff400ff616ffbfe05471cdcc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Oct 19 18:40:10 2013 -0700

    Wrap some overly long lines
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/mouse.c b/src/mouse.c
index 0487067..f60d6c2 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -604,7 +604,8 @@ MouseCommonOptions(InputInfoPtr pInfo)
         char *msg = NULL;
 
         if ((sscanf(s, "%d %d", &b1, &b2) == 2) &&
-        (b1 > 0) && (b1 <= MSE_MAXBUTTONS) && (b2 > 0) && (b2 <= MSE_MAXBUTTONS)) {
+            (b1 > 0) && (b1 <= MSE_MAXBUTTONS) &&
+            (b2 > 0) && (b2 <= MSE_MAXBUTTONS)) {
             msg = xstrdup("buttons XX and YY");
             if (msg)
                 sprintf(msg, "buttons %d and %d", b1, b2);
@@ -2005,7 +2006,8 @@ buttonTimer(InputInfoPtr pInfo)
         xf86PostButtonEvent(pInfo->dev, 0, abs(id), (id >= 0), 0, 0);
         pMse->emulateState = stateTab[pMse->emulateState][4][2];
     } else {
-        LogMessageVerbSigSafe(X_WARNING, -1, "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 +2048,8 @@ Emulate3ButtonsSoft(InputInfoPtr pInfo)
     if (!pMse->emulate3ButtonsSoft)
         return TRUE;
 
-    LogMessageVerbSigSafe(X_INFO, 4, "mouse: 3rd Button detected: disabling emulate3Button\n");
+    LogMessageVerbSigSafe(X_INFO, 4,
+        "mouse: 3rd Button detected: disabling emulate3Button\n");
 
     Emulate3ButtonsSetEnabled(pInfo, FALSE);
 
@@ -2111,8 +2114,8 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy)
     if (pMse->doubleClickSourceButtonMask) {
         if (buttons & pMse->doubleClickSourceButtonMask) {
             if (!(pMse->doubleClickOldSourceState)) {
-                /* double-click button has just been pressed. Ignore it if target button
-                 * is already down.
+                /* double-click button has just been pressed.
+                 * Ignore it if target button is already down.
                  */
                 if (!(buttons & pMse->doubleClickTargetButtonMask)) {
                     /* Target button isn't down, so send a double-click */
@@ -2154,8 +2157,10 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy)
                      * If the button is released early enough emit the button
                      * press/release events
                      */
-                    xf86PostButtonEvent(pInfo->dev, 0, pMse->wheelButton, 1, 0, 0);
-                    xf86PostButtonEvent(pInfo->dev, 0, pMse->wheelButton, 0, 0, 0);
+                    xf86PostButtonEvent(pInfo->dev, 0, pMse->wheelButton,
+                                        1, 0, 0);
+                    xf86PostButtonEvent(pInfo->dev, 0, pMse->wheelButton,
+                                        0, 0, 0);
                 }
             }
         } else
@@ -2187,8 +2192,10 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy)
                          */
                         if (!(emuWheelButtonMask & buttons) ||
                             (emuWheelButtonMask & wheelButtonMask)) {
-                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton, 1, 0, 0);
-                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton, 0, 0, 0);
+                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton,
+                                                1, 0, 0);
+                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton,
+                                                0, 0, 0);
                         }
                     }
                 }
@@ -2215,8 +2222,10 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy)
                          */
                         if (!(emuWheelButtonMask & buttons) ||
                             (emuWheelButtonMask & wheelButtonMask)) {
-                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton, 1, 0, 0);
-                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton, 0, 0, 0);
+                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton,
+                                                1, 0, 0);
+                            xf86PostButtonEvent(pInfo->dev, 0, emuWheelButton,
+                                                0, 0, 0);
                         }
                     }
                 }
@@ -2327,7 +2336,8 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy)
                 stateTab[pMse->emulateState][emulateButtons][2];
 
             if (stateTab[pMse->emulateState][4][0] != 0) {
-                pMse->emulate3Expires = GetTimeInMillis () + pMse->emulate3Timeout;
+                pMse->emulate3Expires =
+                    GetTimeInMillis() + pMse->emulate3Timeout;
                 pMse->emulate3Pending = TRUE;
             } else {
                 pMse->emulate3Pending = FALSE;


Reply to: