tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: problems using mouse
In message <gloeep$iag$1%ger.gmane.org@localhost>
on Wed, 28 Jan 2009 02:04:09 +0000 (UTC),
christos%astron.com@localhost (Christos Zoulas) wrote:
> >Please commit the patch to xf86-input-mouse!
> >(I would commit if you don't have time.)
>
> I think that there *must* be a place to do this in the server code,
> and we don't want OS specific changes in the os agnostic drivers, do we?
Sure. And I create patch from recent your commit to xsrc.
It works for me.
Before actual commit, maybe I need to bump PKGREVISION and
BUILDLINK_API_DEPENDS.modular-xorg-server to xorg-server-1.4.2nb5.
--
Takahiro Kambe <taca%back-street.net@localhost>
Index: x11/modular-xorg-server/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/x11/modular-xorg-server/distinfo,v
retrieving revision 1.30
diff -u -p -u -r1.30 distinfo
--- x11/modular-xorg-server/distinfo 4 Jan 2009 20:02:12 -0000 1.30
+++ x11/modular-xorg-server/distinfo 3 Feb 2009 15:09:35 -0000
@@ -1,11 +1,5 @@
$NetBSD: distinfo,v 1.30 2009/01/04 20:02:12 wiz Exp $
-SHA1 (Mesa-7.0.4-xorg-server_GL) = 6aed65e64c7a684a5d707334a4b4fe7711966380
-RMD160 (Mesa-7.0.4-xorg-server_GL) = 2028532d79f5bba1d09ae787a1799fc4b206a5d7
-Size (Mesa-7.0.4-xorg-server_GL) = 34729 bytes
-SHA1 (MesaLib-7.0.4.tar.bz2) = 7e2ecbe89d245510d2681d04e959aee6adc205c5
-RMD160 (MesaLib-7.0.4.tar.bz2) = 0394bb9e00ea13f2399bc5895d4264221bbc03ac
-Size (MesaLib-7.0.4.tar.bz2) = 3414357 bytes
SHA1 (xorg-server-1.4.2-20080917.patch.gz) =
e8fced0a6ada867d6bfdedda22a8bf178fa48977
RMD160 (xorg-server-1.4.2-20080917.patch.gz) =
2463fa939dc9340e79c03356fa47310343d9e10c
Size (xorg-server-1.4.2-20080917.patch.gz) = 28955 bytes
@@ -24,4 +18,6 @@ SHA1 (patch-sb) = b769780b446e4f10bc99cc
SHA1 (patch-sc) = 33c4d4731e3732032f84946fc17e28d0cba389a6
SHA1 (patch-sd) = ac8f5bc3bca8c21e91d7206a5b2cb400c54f7414
SHA1 (patch-se) = 22b20c734b7fcf59d75227aeb1fa703465582568
+SHA1 (patch-sf) = 91e4bfe17a53e0f1981b0421b005763ad26ce0f7
+SHA1 (patch-sg) = 26769918ade3989c0651b58ed8498a8d8e496862
SHA1 (patch-xkb) = 4bd5f8d86cf3ad2f351cf8407221cf79812ed8e6
Index: x11/modular-xorg-server/patches/patch-sf
===================================================================
RCS file: x11/modular-xorg-server/patches/patch-sf
diff -N x11/modular-xorg-server/patches/patch-sf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ x11/modular-xorg-server/patches/patch-sf 3 Feb 2009 15:09:35 -0000
@@ -0,0 +1,42 @@
+$NetBSD$
+
+Mouse setup support for NetBSD.
+
+--- hw/xfree86/os-support/bsd/bsd_mouse.c.orig 2008-06-11 02:57:19.000000000
+0900
++++ hw/xfree86/os-support/bsd/bsd_mouse.c
+@@ -383,6 +383,25 @@ FindDevice(InputInfoPtr pInfo, const cha
+ }
+ #endif /* __OpenBSD__ && WSCONS_SUPPORT */
+
++#if defined(__NetBSD__)
++
++static Bool
++SetupMouse(InputInfoPtr pInfo)
++{
++#ifdef WSCONS_SUPPORT
++#ifdef 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);
++ return FALSE;
++ }
++#endif
++#endif
++ return TRUE;
++}
++
++#endif /* __NetBSD__ */
++
+ #ifdef WSCONS_SUPPORT
+ #define NUMEVENTS 64
+
+@@ -783,6 +802,9 @@ xf86OSMouseInit(int flags)
+ p->SetupAuto = SetupAuto;
+ p->SetMiscRes = SetMouseRes;
+ #endif
++#if defined(__NetBSD__)
++ p->SetupMouse = SetupMouse;
++#endif
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__OpenBSD__) || defined(__DragonFly__)
+ p->FindDevice = FindDevice;
+ #endif
Index: x11/modular-xorg-server/patches/patch-sg
===================================================================
RCS file: x11/modular-xorg-server/patches/patch-sg
diff -N x11/modular-xorg-server/patches/patch-sg
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ x11/modular-xorg-server/patches/patch-sg 3 Feb 2009 15:09:35 -0000
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Mouse setup support for NetBSD.
+
+--- hw/xfree86/os-support/xf86OSmouse.h.orig 2008-06-06 19:03:10.000000000
+0900
++++ hw/xfree86/os-support/xf86OSmouse.h
+@@ -82,6 +82,7 @@ typedef Bool (*BuiltinPreInitProc)(Input
+ int flags);
+ typedef const char *(*DefaultProtocolProc)(void);
+ typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara);
++typedef Bool (*SetupMouseProc)(InputInfoPtr pInfo);
+ typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate,
+ int res);
+ typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char
*protocol,
+@@ -99,6 +100,7 @@ typedef struct {
+ BuiltinPreInitProc PreInit;
+ DefaultProtocolProc DefaultProtocol;
+ SetupAutoProc SetupAuto;
++ SetupMouseProc SetupMouse;
+ SetResProc SetPS2Res;
+ SetResProc SetBMRes;
+ SetResProc SetMiscRes;
+@@ -141,6 +143,8 @@ typedef struct {
+ *
+ * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types.
+ *
++ * SetupMouse: Called once after open to condition the file descriptor.
++ *
+ * SetMiscRes: Set the resolution and sample rate for MSE_MISC
protocol types.
+ *
+ * FindDevice: This function gets called when no Device has been
specified
Index: x11/xf86-input-mouse/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/x11/xf86-input-mouse/distinfo,v
retrieving revision 1.6
diff -u -p -u -r1.6 distinfo
--- x11/xf86-input-mouse/distinfo 30 May 2008 10:54:57 -0000 1.6
+++ x11/xf86-input-mouse/distinfo 3 Feb 2009 15:09:35 -0000
@@ -4,3 +4,4 @@ SHA1 (xf86-input-mouse-1.3.0.tar.bz2) =
RMD160 (xf86-input-mouse-1.3.0.tar.bz2) =
a691e809e61e14e2383f1d4533b0eb454373667f
Size (xf86-input-mouse-1.3.0.tar.bz2) = 282157 bytes
SHA1 (patch-aa) = baf529a3ae260e98fb068cb9549f749705d8213b
+SHA1 (patch-sa) = 563c754e621c90a214a2c802daabeb7d975c6310
Index: x11/xf86-input-mouse/patches/patch-sa
===================================================================
RCS file: x11/xf86-input-mouse/patches/patch-sa
diff -N x11/xf86-input-mouse/patches/patch-sa
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ x11/xf86-input-mouse/patches/patch-sa 3 Feb 2009 15:09:35 -0000
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Mouse setup support for NetBSD.
+
+--- src/mouse.c.orig 2008-03-21 03:55:51.000000000 +0900
++++ src/mouse.c
+@@ -2538,6 +2538,10 @@ SetupMouse(InputInfoPtr pInfo)
+ Bool automatic = FALSE;
+
+ pMse = pInfo->private;
++
++ if (osInfo->SetupMouse)
++ if (!osInfo->SetupMouse(pInfo))
++ return FALSE;
+
+ /* Handle the "Auto" protocol. */
+ if (pMse->protocolID == PROT_AUTO) {
Home |
Main Index |
Thread Index |
Old Index