Current-Users archive

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

Re: problems using mouse



On Sun, Jan 25, 2009 at 04:03:47PM +0100, Bernd Ernesti wrote:
> On Mon, Jan 19, 2009 at 12:27:41AM +0100, Kurt Schreiner wrote:
> > Hi,
> > 
> > since upgrading to -current some days ago the mouse on my notebook
> > (running in-tree Xorg) only moves horizontaly!
> 
> It would be nice to get this fixed.
> 
> I no longer have any old program/library installed, so it can't be
> a compat issue.
I'm running with the patch in the attached mail. With this applied
the mouse is ok - until you switch form X to console tty.
After switching back to X, the mouse moves only horizontaly again...
(not a real problem for me...)

Kurt

--- Begin Message ---
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


--- End Message ---


Home | Main Index | Thread Index | Old Index