28d73256018ee4600366ffb8ea63802e7ef74443
[packages.git] / XOrg / server / xorg-kdrive-X11R7.2 / patches / kdrive-use-evdev.patch
1 --- xserver/hw/kdrive/fbdev/fbinit.c~   2006-01-31 17:09:33.000000000 +0100
2 +++ xserver/hw/kdrive/fbdev/fbinit.c    2006-01-31 17:11:55.000000000 +0100
3 @@ -28,6 +28,8 @@
4  #endif
5  #include <fbdev.h>
6  
7 +extern int use_evdev;
8 +
9  void
10  InitCard (char *name)
11  {
12 @@ -45,7 +47,10 @@
13  void
14  InitInput (int argc, char **argv)
15  {
16 -    KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
17 +    if (use_evdev)
18 +        KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
19 +    else
20 +        KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
21  #ifdef TOUCHSCREEN
22      KdAddMouseDriver (&TsFuncs);
23  #endif
24 --- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
25 +++ xserver/hw/kdrive/src/kdrive.c      2006-01-31 17:15:28.000000000 +0100
26 @@ -44,6 +44,8 @@
27  #include "dpmsproc.h"
28  #endif
29  
30 +int use_evdev = 0;
31 +
32  typedef struct _kdDepths {
33      CARD8   depth;
34      CARD8   bpp;
35 @@ -687,6 +689,7 @@
36      ErrorF("-videoTest       Start the server, pause momentarily and exit\n");
37      ErrorF("-origin X,Y      Locates the next screen in the the virtual screen (Xinerama)\n");
38      ErrorF("-mouse path[,n]  Filename of mouse device, n is number of buttons\n");
39 +    ErrorF("-use-evdev       Use Linux evdev input\n");
40      ErrorF("-switchCmd       Command to execute on vt switch\n");
41      ErrorF("-nozap           Don't terminate server on Ctrl+Alt+Backspace\n");
42      ErrorF("vtxx             Use virtual terminal xx instead of the next available\n");
43 @@ -796,6 +799,11 @@
44             UseMsg ();
45         return 2;
46      }
47 +    if (!strcmp (argv[i], "-use-evdev"))
48 +    {
49 +       use_evdev = 1;
50 +       return 1;
51 +    }
52      if (!strcmp (argv[i], "-keyboard"))
53      {
54         if ((i+1) < argc)