Current-Users archive

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

Re: problems using mouse



On Tue, 20 Jan 2009 09:29:56 +0100
Kurt Schreiner <ks%ub.uni-mainz.de@localhost> wrote:

> Hm, so with christos' changes wsmoused does the right thing now, but
> the mouse in Xorg is still busted for me: With wsmoused running it just
> dosn't move at all (maybe that's ok?), and killing wsmoused brings back
> horizontal movement only...

Try the attached patch, which was also posted to tech-x11@.
It applies to xf86-input-mouse, not xorg-server, which doesn't feel
right. But it seems to do the trick for now ...

-Tobias
$NetBSD$

--- src/mouse.c.orig    2008-03-20 19:55:51.000000000 +0100
+++ src/mouse.c
@@ -76,6 +76,11 @@
 #define NEED_XF86_TYPES        /* for xisb.h when !XFree86LOADER */
 #endif
 
+#ifdef __NetBSD__
+#include <time.h>
+#include <dev/wscons/wsconsio.h>
+#endif
+
 #include "compiler.h"
 
 #include "xisb.h"
@@ -1760,6 +1765,13 @@ 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)
+           if (!strcmp(pMse->protocol, "wsmouse")) {
+               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



Home | Main Index | Thread Index | Old Index