xserver-kdrive: Add 1.7.99.2

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2010-02-11 12:15:06 +00:00
parent 2146902ae4
commit 25e0acc952
31 changed files with 1294 additions and 6866 deletions

View File

@ -1,17 +0,0 @@
Index: xorg-server-1.4/hw/kdrive/Makefile.am
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/Makefile.am 2007-08-30 01:48:57.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/Makefile.am 2007-09-06 23:24:29.000000000 +0200
@@ -1,10 +1,10 @@
if KDRIVEVESA
-VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga nvidia pm2 r128 \
+VESA_SUBDIRS = vesa ati chips i810 mach64 mga nvidia pm2 r128 \
smi via
endif
if BUILD_KDRIVEFBDEVLIB
-FBDEV_SUBDIRS = fbdev
+FBDEV_SUBDIRS = fbdev epson
endif
if XFAKESERVER

View File

@ -1,24 +0,0 @@
--- /tmp/configure.ac 2008-04-16 10:52:15.016442542 +0200
+++ xorg-server-1.4.99.901/configure.ac 2008-04-16 10:54:23.786428934 +0200
@@ -1925,7 +1925,7 @@
AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt"))
if test "x$TSLIB" = xyes; then
- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
if test "x$HAVE_TSLIB" = xno; then
AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
fi
@@ -1949,10 +1949,10 @@
;;
esac
KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
- KDRIVE_LOCAL_LIBS="$TSLIB_LIBS $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
+ KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
- KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
+ KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
# check if we can build Xephyr
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])

View File

@ -1,11 +0,0 @@
--- xserver.orig/hw/kdrive/epson/epson13806stub.c 2004-10-20 10:20:51.000000000 +0200
+++ xserver/hw/kdrive/epson/epson13806stub.c 2005-03-17 14:38:22.000000000 +0100
@@ -55,7 +55,7 @@
{
KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
#ifdef TOUCHSCREEN
- KdInitTouchScreen (&TsFuncs);
+ KdAddMouseDriver (&TsFuncs);
#endif
}

View File

@ -1,19 +0,0 @@
Index: xorg-server-1.4/hw/kdrive/fbdev/fbinit.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/fbdev/fbinit.c 2007-09-08 21:27:44.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/fbdev/fbinit.c 2007-09-08 21:28:55.000000000 +0200
@@ -46,11 +46,13 @@
KdAddKeyboardDriver (&LinuxKeyboardDriver);
KdAddPointerDriver (&LinuxMouseDriver);
+ KdAddKeyboardDriver (&LinuxEvdevKeyboardDriver);
+ KdAddPointerDriver (&LinuxEvdevMouseDriver);
#ifdef TSLIB
KdAddPointerDriver (&TsDriver);
#endif
- ki = KdParseKeyboard ("keybd");
+ ki = KdParseKeyboard ("keyboard");
KdAddKeyboard(ki);
KdInitInput ();

View File

@ -1,14 +0,0 @@
--- xserver/hw/kdrive/fbdev/fbdev.c~ 2004-09-15 00:08:10.000000000 +0100
+++ xserver/hw/kdrive/fbdev/fbdev.c 2004-11-13 17:47:02.000000000 +0000
@@ -198,6 +198,11 @@
return FALSE;
}
+ /* Re-get the "fixed" parameters since they might have changed */
+ k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix);
+ if (k < 0)
+ perror ("FBIOGET_FSCREENINFO");
+
/* Now get the new screeninfo */
ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var);
depth = priv->var.bits_per_pixel;

View File

@ -1,16 +0,0 @@
Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c 2007-09-29 18:31:15.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200
@@ -743,11 +743,6 @@
cfsetispeed(&nTty, 9600);
cfsetospeed(&nTty, 9600);
tcsetattr(fd, TCSANOW, &nTty);
- /*
- * Flush any pending keystrokes
- */
- while ((n = read (fd, buf, sizeof (buf))) > 0)
- ;
KdRegisterFd (fd, LinuxKeyboardRead, ki);
return Success;
}

View File

@ -1,44 +0,0 @@
Index: git/hw/kdrive/linux/keyboard.c
===================================================================
--- git.orig/hw/kdrive/linux/keyboard.c 2007-11-14 21:30:45.000000000 +0000
+++ git/hw/kdrive/linux/keyboard.c 2007-11-15 12:00:11.000000000 +0000
@@ -42,6 +42,8 @@
#include <sys/ioctl.h>
extern int LinuxConsoleFd;
+static unsigned char mediumraw_data, mediumraw_up;
+static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT;
static const KeySym linux_to_x[256] = {
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
@@ -701,7 +703,29 @@
else
#endif
scancode = b[0] & 0x7f;
- KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
+ /* This is extended medium raw mode interpreter
+ see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */
+ switch (mediumraw_state)
+ {
+ case DEFAULT:
+ if (scancode == 0)
+ {
+ mediumraw_state = EXTBYTE1;
+ mediumraw_up = b[0] & 0x80;
+ }
+ else
+ KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
+ break;
+ case EXTBYTE1:
+ mediumraw_data = scancode;
+ mediumraw_state = EXTBYTE2;
+ break;
+ case EXTBYTE2:
+ /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */
+ KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up);
+ mediumraw_state = DEFAULT;
+ break;
+ }
b++;
}
}

View File

@ -1,12 +0,0 @@
--- dix/devices.c~ 2008-04-16 13:01:08.000000000 +0200
+++ dix/devices.c 2008-04-16 13:01:08.000000000 +0200
@@ -527,8 +527,8 @@
#ifdef XKB
if (dev->key->xkbInfo)
XkbFreeInfo(dev->key->xkbInfo);
-#endif
dev->key->xkbInfo = NULL;
+#endif
xfree(dev->key->curKeySyms.map);
xfree(dev->key->modifierKeyMap);
xfree(dev->key);

View File

@ -1,15 +0,0 @@
Index: xorg-server-1.4/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/linux/tslib.c 2007-09-08 19:58:08.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/linux/tslib.c 2007-09-08 19:58:09.000000000 +0200
@@ -121,6 +121,10 @@
private->raw_event_hook = NULL;
private->raw_event_closure = NULL;
+ if (!pi->path) {
+ pi->path = "/dev/input/touchscreen0";
+ ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
+ }
private->tsDev = ts_open(pi->path, 0);
private->fd = ts_fd(private->tsDev);
if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) {

View File

@ -1,54 +0,0 @@
Index: xorg-server-1.4/hw/kdrive/Makefile.am
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/Makefile.am 2007-09-06 23:32:04.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/Makefile.am 2007-09-06 23:33:44.000000000 +0200
@@ -11,6 +11,10 @@
XFAKE_SUBDIRS = fake
endif
+if KDRIVEW100
+W100_SUBDIRS = w100
+endif
+
if XSDLSERVER
XSDL_SUBDIRS = sdl
endif
@@ -26,6 +30,7 @@
SERVER_SUBDIRS = \
$(XSDL_SUBDIRS) \
$(FBDEV_SUBDIRS) \
+ $(W100_SUBDIRS) \
$(VESA_SUBDIRS) \
$(XEPHYR_SUBDIRS) \
$(XFAKE_SUBDIRS)
Index: xorg-server-1.4/configure.ac
===================================================================
--- xorg-server-1.4.orig/configure.ac 2007-09-06 23:32:05.000000000 +0200
+++ xorg-server-1.4/configure.ac 2007-09-06 23:34:41.000000000 +0200
@@ -535,6 +535,7 @@
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto])
+AC_ARG_ENABLE(w100, AS_HELP_STRING([--enable-w100], [Build the kdrive Xw100 server (default: no)]), [KDRIVEW100=$enableval], [KDRIVEW100=no])
AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto])
AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto])
AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto])
@@ -1669,6 +1670,10 @@
fi
AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes])
+AM_CONDITIONAL(KDRIVEW100, [test "x$KDRIVEW100" = xyes])
+if test "x$KDRIVEW100" = xyes; then
+ AC_DEFINE(KDRIVEW100, 1, [Build Xw100 server])
+fi
dnl XWin DDX
@@ -2112,6 +2117,7 @@
hw/kdrive/epson/Makefile
hw/kdrive/fake/Makefile
hw/kdrive/fbdev/Makefile
+hw/kdrive/w100/Makefile
hw/kdrive/i810/Makefile
hw/kdrive/linux/Makefile
hw/kdrive/mach64/Makefile

View File

@ -1,15 +0,0 @@
Patch suggested by Manuel Teira to actually enable offscreen pixmap
acceleration in Xw100. Value 16 is empirical, works well on hx4700,
but in case of issues, consider double it (other accelerated drivers
use bigger values than 16).
--- xorg-server-1.2.0/hw/kdrive/w100/ati_draw.c.org 2007-04-04 10:28:57.000000000 +0000
+++ xorg-server-1.2.0/hw/kdrive/w100/ati_draw.c 2007-04-06 14:43:40.000000000 +0000
@@ -433,6 +433,7 @@
* or kaaPixmapUseScreen. But this is probably caused by some bug in this
* driver... */
atis->kaa.flags |= KAA_OFFSCREEN_PIXMAPS;
+ atis->kaa.pitchAlign = 16;
if (!kaaDrawInit(pScreen, &atis->kaa))
return FALSE;

View File

@ -1,28 +0,0 @@
Index: xorg-server-1.4/hw/kdrive/w100/ati_stub.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/w100/ati_stub.c 2007-09-08 21:40:26.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/w100/ati_stub.c 2007-09-08 22:04:27.000000000 +0200
@@ -74,10 +74,20 @@
void
InitInput(int argc, char **argv)
{
- KdInitInput(&LinuxMouseFuncs, &LinuxKeyboardFuncs);
-#ifdef TOUCHSCREEN
- KdAddMouseDriver(&TsFuncs);
+ KdKeyboardInfo *ki;
+
+ KdAddKeyboardDriver (&LinuxKeyboardDriver);
+ KdAddPointerDriver (&LinuxMouseDriver);
+ KdAddKeyboardDriver (&LinuxEvdevKeyboardDriver);
+ KdAddPointerDriver (&LinuxEvdevMouseDriver);
+#ifdef TSLIB
+ KdAddPointerDriver (&TsDriver);
#endif
+
+ ki = KdParseKeyboard ("keyboard");
+ KdAddKeyboard(ki);
+
+ KdInitInput ();
}
void

File diff suppressed because it is too large Load Diff

View File

@ -1,159 +0,0 @@
CRUDE HACK ALERT: this patch adds a new device control (DEVICE_RAWEVENT)
which cannot be exported in the protocol because the xDeviceRaweventCtl
carries a C pointer to the tslib event hook. For lack of a better idea,
I added this to get the event hook pointer from Xext/xcalibrate.c into
tslib.c, where the now-private _raw_event_hook and _raw_event_closure
pointers are manipulated instead of, like before, in the Xcalibrate
extension itself.
Index: xorg-server-1.4/Xext/xcalibrate.c
===================================================================
--- xorg-server-1.4.orig/Xext/xcalibrate.c 2007-09-08 13:22:55.000000000 +0200
+++ xorg-server-1.4/Xext/xcalibrate.c 2007-09-08 16:03:17.000000000 +0200
@@ -33,14 +33,14 @@
#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
+#include "inputstr.h" /* for inputInfo */
#include "swaprep.h"
+#include <X11/extensions/XI.h> /* for XI_TOUCHSCREEN */
+#include <X11/extensions/XIproto.h> /* for xDeviceCtl */
#include <X11/extensions/xcalibrateproto.h>
#include <X11/extensions/xcalibratewire.h>
-extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
-extern void *tslib_raw_event_closure;
-
static CARD8 XCalibrateReqCode;
int XCalibrateEventBase;
int XCalibrateReqBase;
@@ -64,6 +64,31 @@
WriteEventsToClient (pClient, 1, (xEvent *) &ev);
}
+#define DEVICE_RAWEVENT 6
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ void *hook;
+} xDeviceRaweventCtl;
+
+static void
+xcalibrate_set_event_hook (void *hook, ClientPtr client)
+{
+ DeviceIntPtr devtmp;
+ Atom xiclass;
+ xDeviceRaweventCtl rawevent;
+
+ rawevent.control = DEVICE_RAWEVENT;
+ rawevent.length = sizeof(rawevent);
+ rawevent.hook = hook;
+
+ xiclass = MakeAtom(XI_TOUCHSCREEN, strlen(XI_TOUCHSCREEN), 1);
+
+ for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next)
+ if (devtmp->type == xiclass)
+ ChangeDeviceControl(client, devtmp, (xDeviceCtl *) &rawevent);
+}
+
static int
ProcXCalibrateQueryVersion (ClientPtr client)
{
@@ -124,8 +149,7 @@
{
/* Start calibrating. */
xcalibrate_client = client;
- tslib_raw_event_hook = xcalibrate_event_hook;
- tslib_raw_event_closure = client;
+ xcalibrate_set_event_hook(xcalibrate_event_hook, client);
rep.status = GrabSuccess;
}
else
@@ -139,8 +163,7 @@
{
/* Stop calibrating. */
xcalibrate_client = NULL;
- tslib_raw_event_hook = NULL;
- tslib_raw_event_closure = NULL;
+ xcalibrate_set_event_hook(NULL, NULL);
rep.status = GrabSuccess;
/* Cycle input off and on to reload configuration. */
@@ -277,8 +300,7 @@
{
/* Stop calibrating. */
xcalibrate_client = NULL;
- tslib_raw_event_hook = NULL;
- tslib_raw_event_closure = NULL;
+ xcalibrate_set_event_hook(NULL, NULL);
}
}
Index: xorg-server-1.4/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/linux/tslib.c 2007-09-08 14:46:41.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/linux/tslib.c 2007-09-08 16:10:57.000000000 +0200
@@ -56,6 +56,13 @@
int phys_screen;
};
+void
+tslib_set_raw_event_hook(KdPointerInfo *pi, void *hook, void *closure)
+{
+ struct TslibPrivate *private = pi->driverPrivate;
+ private->raw_event_hook = hook;
+ private->raw_event_closure = closure;
+}
static void
TsRead (int fd, void *closure)
Index: xorg-server-1.4/hw/kdrive/src/kinput.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/src/kinput.c 2007-09-08 14:45:01.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/src/kinput.c 2007-09-08 16:09:32.000000000 +0200
@@ -2389,10 +2389,19 @@
return BadMatch;
}
+#define DEVICE_RAWEVENT 6
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ void *hook;
+} xDeviceRaweventCtl;
+
int
ChangeDeviceControl(register ClientPtr client, DeviceIntPtr pDev,
xDeviceCtl *control)
{
+ KdPointerInfo *pi;
+
switch (control->control) {
case DEVICE_RESOLUTION:
/* FIXME do something more intelligent here */
@@ -2406,6 +2415,24 @@
case DEVICE_ENABLE:
return Success;
+ case DEVICE_RAWEVENT:
+ if (!pDev)
+ return BadImplementation;
+
+ for (pi = kdPointers; pi; pi = pi->next) {
+ if (pi->dixdev && pi->dixdev->id == pDev->id)
+ break;
+ }
+
+ if (!pi || !pi->dixdev || pi->dixdev->id != pDev->id) {
+ ErrorF("[ChangeDeviceControl] Failed to find pointer for device %d!\n",
+ pDev->id);
+ return BadImplementation;
+ }
+
+ tslib_set_raw_event_hook(pi, ((xDeviceRaweventCtl *)control)->hook, client);
+ return Success;
+
default:
return BadMatch;
}

View File

@ -1,19 +0,0 @@
--- /tmp/servermd.h 2007-09-30 17:27:22.310911628 +0200
+++ xorg-server-1.4/include/servermd.h 2007-09-30 17:28:25.297799199 +0200
@@ -130,6 +130,16 @@
#endif /* vax */
+#ifdef __avr32__
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#define GETLEFTBITS_ALIGNMENT 1
+#define AVOID_MEMORY_READ
+
+#endif /* __avr32__ */
+
#ifdef __arm32__
#define IMAGE_BYTE_ORDER LSBFirst

View File

@ -0,0 +1,19 @@
Index: xorg-server-1.7.99.2/configure.ac
===================================================================
--- xorg-server-1.7.99.2.orig/configure.ac 2010-01-29 16:38:49.000000000 +0000
+++ xorg-server-1.7.99.2/configure.ac 2010-01-29 16:42:39.000000000 +0000
@@ -503,14 +503,10 @@
dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
dnl otherwise uses standard subdirectories of FONTROOTDIR
-AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
- [
DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
case $host_os in
darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
esac
- ])
AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
[ FONTPATH="$withval" ],
[ FONTPATH="${DEFAULT_FONT_PATH}" ])

View File

@ -0,0 +1,20 @@
--- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000
+++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000
@@ -342,7 +342,7 @@
/*
* Open the APM driver
*/
- LinuxApmFd = open ("/dev/apm_bios", 2);
+ /*LinuxApmFd = open ("/dev/apm_bios", 2);
if (LinuxApmFd < 0 && errno == ENOENT)
LinuxApmFd = open ("/dev/misc/apm_bios", 2);
if (LinuxApmFd >= 0)
@@ -352,7 +352,7 @@
RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
AddEnabledDevice (LinuxApmFd);
}
-
+ */
/*
* now get the VT
*/

View File

@ -0,0 +1,12 @@
--- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200
+++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200
@@ -52,8 +52,8 @@
/* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */
#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
+#include <kdrive-config.h>
#endif
#include <X11/X.h>

View File

@ -0,0 +1,148 @@
---
Xext/Makefile.am | 6 ++++++
configure.ac | 11 +++++++++--
include/kdrive-config.h.in | 3 +++
mi/miinitext.c | 6 ++++++
4 files changed, 24 insertions(+), 2 deletions(-)
Index: xorg-server-1.7.99.2/mi/miinitext.c
===================================================================
--- xorg-server-1.7.99.2.orig/mi/miinitext.c 2010-02-10 18:54:11.959086237 +0000
+++ xorg-server-1.7.99.2/mi/miinitext.c 2010-02-10 18:54:12.429078513 +0000
@@ -264,6 +264,9 @@
#ifdef DMXEXT
extern void DMXExtensionInit(INITARGS);
#endif
+#ifdef XCALIBRATE
+extern void XCalibrateExtensionInit(INITARGS);
+#endif
#ifdef XFIXES
extern void XFixesExtensionInit(INITARGS);
#endif
@@ -493,6 +496,9 @@
GlxPushProvider(&__glXDRISWRastProvider);
if (!noGlxExtension) GlxExtensionInit();
#endif
+#ifdef XCALIBRATE
+ XCalibrateExtensionInit ();
+#endif
}
#else /* XFree86LOADER */
Index: xorg-server-1.7.99.2/configure.ac
===================================================================
--- xorg-server-1.7.99.2.orig/configure.ac 2010-02-10 18:54:11.959086237 +0000
+++ xorg-server-1.7.99.2/configure.ac 2010-02-11 11:49:50.710736962 +0000
@@ -1985,7 +1985,7 @@
fi
- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
if test "x$HAVE_TSLIB" = xno; then
AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"])
fi
@@ -2039,7 +2039,7 @@
KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
- KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
+ KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $TSLIB_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
AC_SUBST([XEPHYR_LIBS])
AC_SUBST([XEPHYR_INCS])
Index: xorg-server-1.7.99.2/include/kdrive-config.h.in
===================================================================
--- xorg-server-1.7.99.2.orig/include/kdrive-config.h.in 2010-02-10 18:54:11.959086237 +0000
+++ xorg-server-1.7.99.2/include/kdrive-config.h.in 2010-02-10 18:54:12.429078513 +0000
@@ -28,4 +28,7 @@
/* Have execinfo.h for backtrace(). */
#undef HAVE_EXECINFO_H
+/* Enable XCalibrate extension */
+#undef XCALIBRATE
+
#endif /* _KDRIVE_CONFIG_H_ */
Index: xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.7.99.2.orig/hw/kdrive/linux/tslib.c 2010-02-10 18:58:12.669078495 +0000
+++ xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c 2010-02-10 19:04:56.927828767 +0000
@@ -50,12 +50,15 @@
int fd;
int lastx, lasty;
struct tsdev *tsDev;
- void (*raw_event_hook)(int x, int y, int pressure, void *closure);
- void *raw_event_closure;
int phys_screen;
};
+/* For XCalibrate extension */
+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
+void *tslib_raw_event_closure;
+
+
static void
TsRead (int fd, void *closure)
{
@@ -65,10 +68,10 @@
long x = 0, y = 0;
unsigned long flags;
- if (private->raw_event_hook) {
+ if (tslib_raw_event_hook) {
while (ts_read_raw(private->tsDev, &event, 1) == 1)
- private->raw_event_hook (event.x, event.y, event.pressure,
- private->raw_event_closure);
+ tslib_raw_event_hook (event.x, event.y, event.pressure,
+ tslib_raw_event_closure);
return;
}
@@ -111,8 +114,8 @@
{
struct TslibPrivate *private = pi->driverPrivate;
- private->raw_event_hook = NULL;
- private->raw_event_closure = NULL;
+ tslib_raw_event_hook = NULL;
+ tslib_raw_event_closure = NULL;
if (!pi->path) {
pi->path = strdup("/dev/input/touchscreen0");
ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
Index: xorg-server-1.7.99.2/Xext/xcalibrate.c
===================================================================
--- xorg-server-1.7.99.2.orig/Xext/xcalibrate.c 2010-02-10 18:59:24.097829840 +0000
+++ xorg-server-1.7.99.2/Xext/xcalibrate.c 2010-02-11 11:51:00.930735731 +0000
@@ -115,6 +115,7 @@
memset (&rep, 0, sizeof (rep));
rep.type = X_Reply;
+ rep.length = 0;
rep.sequenceNumber = client->sequence;
if (stuff->on)
@@ -158,6 +159,7 @@
swaps (&rep.sequenceNumber, n);
swaps (&rep.status, n);
+ swapl (&rep.length, n);
}
WriteToClient(client, sizeof (rep), (char *) &rep);
return (client->noClientException);
@@ -186,6 +188,7 @@
memset (&rep, 0, sizeof (rep));
rep.type = X_Reply;
+ rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.x = stuff->x;
rep.y = stuff->y;
@@ -198,6 +201,7 @@
swaps (&rep.x, n);
swaps (&rep.y, n);
+ swapl (&rep.length, n);
}
WriteToClient(client, sizeof (rep), (char *) &rep);
return (client->noClientException);

View File

@ -0,0 +1,83 @@
Add some extra video modes and change the default to VGA.
---
hw/kdrive/src/kmode.c | 41 +++++++++++++++++++++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
Index: xorg-server-1.3.0.0/hw/kdrive/src/kmode.c
===================================================================
--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kmode.c 2008-01-11 14:20:47.000000000 +0000
+++ xorg-server-1.3.0.0/hw/kdrive/src/kmode.c 2008-01-11 14:21:18.000000000 +0000
@@ -32,6 +32,31 @@ const KdMonitorTiming kdMonitorTimings[
/* H V Hz KHz */
/* FP BP BLANK POLARITY */
+ /* Treo 650 */
+
+ { 320, 320, 64, 16256,
+ 17, 12, 32, KdSyncNegative,
+ 1, 11, 14, KdSyncNegative,
+ },
+
+ { 320, 320, 64, 0,
+ 0, 0, 0, KdSyncNegative,
+ 0, 0, 0, KdSyncNegative,
+ },
+
+ /* LifeDrive/T3/TX modes */
+
+ { 320, 480, 64, 16256,
+ 17, 12, 32, KdSyncNegative,
+ 1, 11, 14, KdSyncNegative,
+ },
+
+ { 480, 320, 64, 0,
+ 0, 0, 0, KdSyncNegative,
+ 0, 0, 0, KdSyncNegative,
+ },
+
+
/* IPAQ modeline:
*
* Modeline "320x240" 5.7222 320 337 340 352 240 241 244 254"
@@ -41,6 +66,11 @@ const KdMonitorTiming kdMonitorTimings[
1, 11, 14, KdSyncNegative,
},
+ { 240, 320, 64, 0,
+ 0, 0, 0, KdSyncNegative,
+ 0, 0, 0, KdSyncNegative,
+ },
+
/* Other VESA modes */
{ 640, 350, 85, 31500, /* VESA */
32, 96, 192, KdSyncPositive, /* 26.413 */
@@ -76,10 +106,19 @@ const KdMonitorTiming kdMonitorTimings[
16, 120, 176, KdSyncNegative, /* 37.861 */
1, 20, 24, KdSyncNegative, /* 72.809 */
},
+ /* DEFAULT */
+#define MONITOR_TIMING_DEFAULT 13
{ 640, 480, 60, 25175, /* VESA */
16, 48, 160, KdSyncNegative, /* 31.469 */
10, 33, 45, KdSyncNegative, /* 59.940 */
},
+
+
+ { 480, 640, 60, 0, /* VESA */
+ 0, 0, 0, KdSyncNegative, /* 31.469 */
+ 0, 0, 0, KdSyncNegative, /* 59.940 */
+ },
+
/* 800x600 modes */
{ 800, 600, 85, 56250, /* VESA */
@@ -90,8 +129,6 @@ const KdMonitorTiming kdMonitorTimings[
16, 160, 256, KdSyncPositive, /* 46.875 */
1, 21, 25, KdSyncPositive, /* 75.000 */
},
- /* DEFAULT */
-#define MONITOR_TIMING_DEFAULT 9
{ 800, 600, 72, 50000, /* VESA */
56, 64, 240, KdSyncPositive, /* 48.077 */
37, 23, 66, KdSyncPositive, /* 72.188 */

View File

@ -0,0 +1,61 @@
Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
===================================================================
--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:12.000000000 +0100
+++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:46.000000000 +0100
@@ -498,6 +498,7 @@
KdScreenInfo *screen = pScreenPriv->screen;
FbdevScrPriv *scrpriv = screen->driver;
Bool wasEnabled = pScreenPriv->enabled;
+ FbdevPriv *priv = screen->card->driver;
FbdevScrPriv oldscr;
int oldwidth;
int oldheight;
@@ -525,11 +526,46 @@
oldheight = screen->height;
oldmmwidth = pScreen->mmWidth;
oldmmheight = pScreen->mmHeight;
-
+
/*
* Set new configuration
*/
-
+
+ if (newwidth != oldwidth || newheight != oldheight)
+ {
+ struct fb_var_screeninfo var;
+ int k;
+
+ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
+
+ if (k < 0)
+ {
+ ErrorF("Error with framebuffer ioctl FBIOGET_VSCREENINFO: %s", strerror (errno));
+ return FALSE;
+ }
+
+ var.xres = newwidth;
+ var.yres = newheight;
+ var.activate = FB_ACTIVATE_NOW;
+
+ k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
+
+ if (k >= 0)
+ {
+ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0)
+ {
+ perror("Error with framebuffer ioctl FIOGET_FSCREENINFO");
+ close (priv->fd);
+ return FALSE;
+ }
+ if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
+ perror("Error framebuffer ioctl FIOGET_VSCREENINFO");
+ close (priv->fd);
+ return FALSE;
+ }
+ }
+ }
+
scrpriv->randr = KdAddRotation (screen->randr, randr);
KdOffscreenSwapOut (screen->pScreen);

View File

@ -0,0 +1,18 @@
---
render/glyphstr.h | 1 +
1 file changed, 1 insertion(+)
--- xorg-server-1.3.0.0.orig/render/glyphstr.h
+++ xorg-server-1.3.0.0/render/glyphstr.h
@@ -23,10 +23,11 @@
*/
#ifndef _GLYPHSTR_H_
#define _GLYPHSTR_H_
+#include <X11/X.h>
#include <X11/extensions/renderproto.h>
#include "picture.h"
#include "screenint.h"
#include "regionstr.h"
#include "miscstruct.h"

View File

@ -0,0 +1,308 @@
Index: xorg-server-1.7.99.2/dix/window.c
===================================================================
--- xorg-server-1.7.99.2.orig/dix/window.c 2009-11-04 16:25:50.000000000 +0000
+++ xorg-server-1.7.99.2/dix/window.c 2010-02-10 17:42:22.719078216 +0000
@@ -179,6 +179,8 @@
#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
+char* RootPPM = NULL;
+
#ifdef DEBUG
/******
* PrintWindowTree
@@ -304,6 +306,115 @@
#endif
}
+static int
+get_int(FILE *fp)
+{
+ int c = 0;
+
+ while ((c = getc(fp)) != EOF)
+ {
+ if (isspace(c))
+ continue;
+
+ if (c == '#')
+ while (c = getc(fp))
+ if (c == EOF)
+ return 0;
+ else if (c == '\n')
+ break;
+
+ if (isdigit(c))
+ {
+ int val = c - '0';
+ while ((c = getc(fp)) && isdigit(c))
+ val = (val * 10) + (c - '0');
+ return val;
+ }
+ }
+
+ return 0;
+}
+
+static unsigned char*
+ppm_load (const char* path, int depth, int *width, int *height)
+{
+ FILE *fp;
+ int max, n = 0, w, h, i, j, bytes_per_line;
+ unsigned char *data, *res, h1, h2;
+
+ if (depth < 16 || depth > 32)
+ return NULL;
+
+ if (depth > 16)
+ depth = 32;
+
+ fp = fopen (path, "r");
+ if (fp == NULL)
+ return FALSE;
+
+ h1 = getc(fp);
+ h2 = getc(fp);
+
+ /* magic is 'P6' for raw ppm */
+ if (h1 != 'P' && h2 != '6')
+ goto fail;
+
+ w = get_int(fp);
+ h = get_int(fp);
+
+ if (w == 0 || h == 0)
+ goto fail;
+
+ max = get_int(fp);
+
+ if (max != 255)
+ goto fail;
+
+ bytes_per_line = ((w * depth + 31) >> 5) << 2;
+
+ res = data = malloc(bytes_per_line * h);
+
+ for (i=0; i<h; i++)
+ {
+ for (j=0; j<w; j++)
+ {
+ unsigned char buf[3];
+ fread(buf, 1, 3, fp);
+
+ switch (depth)
+ {
+ case 24:
+ case 32:
+ *data = buf[2];
+ *(data+1) = buf[1];
+ *(data+2) = buf[0];
+ data += 4;
+ break;
+ case 16:
+ default:
+ *(unsigned short*)data
+ = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3);
+ data += 2;
+ break;
+ }
+ }
+ data += (bytes_per_line - (w*(depth>>3)));
+ }
+
+ data = res;
+
+ *width = w;
+ *height = h;
+
+ fclose(fp);
+
+ return res;
+
+ fail:
+ fclose(fp);
+ return NULL;
+}
+
static void
MakeRootTile(WindowPtr pWin)
{
@@ -314,6 +425,36 @@
unsigned char *from, *to;
int i, j;
+ if (RootPPM != NULL)
+ {
+ int w, h;
+ unsigned char *data;
+
+ if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL)
+ {
+ pWin->background.pixmap
+ = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth, 0);
+
+ pWin->backgroundState = BackgroundPixmap;
+ pGC = GetScratchGC(pScreen->rootDepth, pScreen);
+ if (!pWin->background.pixmap || !pGC)
+ FatalError("could not create root tile");
+
+ ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
+
+ (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap,
+ pGC,
+ pScreen->rootDepth,
+ 0, 0, w, h, 0, ZPixmap, (char *)data);
+ FreeScratchGC(pGC);
+
+ free(data);
+ return;
+ }
+ else
+ ErrorF("Unable to load root window image.");
+ }
+
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
pScreen->rootDepth, 0);
@@ -530,6 +671,7 @@
}
+
WindowPtr
RealChildHead(WindowPtr pWin)
{
Index: xorg-server-1.7.99.2/hw/kdrive/src/kdrive.c
===================================================================
--- xorg-server-1.7.99.2.orig/hw/kdrive/src/kdrive.c 2010-02-10 17:36:36.000000000 +0000
+++ xorg-server-1.7.99.2/hw/kdrive/src/kdrive.c 2010-02-10 17:43:07.797828099 +0000
@@ -60,6 +60,9 @@
{ 32, 32 }
};
+int
+ProcXFixesHideCursor (ClientPtr client) ;
+
#define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0]))
#define KD_DEFAULT_BUTTONS 5
@@ -92,6 +95,9 @@
KdOsFuncs *kdOsFuncs;
+extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */
+extern char* RootPPM; /* dix/window.c */
+
void
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
{
@@ -275,6 +281,7 @@
KdSetRootClip (pScreen, TRUE);
if (pScreenPriv->card->cfuncs->dpms)
(*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
+
return TRUE;
}
@@ -553,6 +560,8 @@
ErrorF("-switchCmd Command to execute on vt switch\n");
ErrorF("-zap Terminate server on Ctrl+Alt+Backspace\n");
ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
+ ErrorF("-hide-cursor Start with cursor hidden\n");
+ ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n");
}
int
@@ -616,6 +625,19 @@
kdSoftCursor = TRUE;
return 1;
}
+ if (!strcmp (argv[i], "-hide-cursor"))
+ {
+ CursorInitiallyHidden = TRUE;
+ return 1;
+ }
+ if (!strcmp (argv[i], "-root-ppm"))
+ {
+ if ((i+1) < argc)
+ RootPPM = argv[i+1];
+ else
+ UseMsg ();
+ return 2;
+ }
if (!strcmp (argv[i], "-videoTest"))
{
kdVideoTest = TRUE;
Index: xorg-server-1.7.99.2/xfixes/cursor.c
===================================================================
--- xorg-server-1.7.99.2.orig/xfixes/cursor.c 2009-12-19 01:43:53.000000000 +0000
+++ xorg-server-1.7.99.2/xfixes/cursor.c 2010-02-10 17:45:02.089079491 +0000
@@ -57,6 +57,7 @@
static RESTYPE CursorClientType;
static RESTYPE CursorHideCountType;
static RESTYPE CursorWindowType;
+static Bool CursorGloballyHidden;
static CursorPtr CursorCurrent[MAXDEVICES];
static CursorPtr pInvisibleCursor = NULL;
@@ -65,6 +66,8 @@
static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
+Bool CursorInitiallyHidden = FALSE;
+
#define VERIFY_CURSOR(pCursor, cursor, client, access) \
do { \
int err; \
@@ -150,7 +153,7 @@
if (ConnectionInfo)
CursorVisible = EnableCursor;
- if (cs->pCursorHideCounts != NULL || !CursorVisible) {
+ if (cs->pCursorHideCounts != NULL || !CursorVisible || CursorGloballyHidden) {
ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) &&
(*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor));
} else {
@@ -887,6 +890,12 @@
return (ret == BadValue) ? BadWindow : ret;
}
+ /* Is cursor set to be initially hidden ?, if so reset this
+ * flag as now visibility assumed under control of client.
+ */
+ if (CursorGloballyHidden)
+ CursorGloballyHidden = FALSE;
+
/*
* Has client hidden the cursor before on this screen?
* If so, just increment the count.
@@ -950,9 +959,19 @@
return (rc == BadValue) ? BadWindow : rc;
}
+ /* X was started with cursor hidden, therefore just reset our flag
+ * (returning to normal client control) and cause cursor to now be
+ * shown.
+ */
+ if (CursorGloballyHidden == TRUE)
+ {
+ CursorGloballyHidden = FALSE;
+ return (client->noClientException);
+ }
+
/*
* Has client hidden the cursor on this screen?
- * If not, generate an error.
+ * If so, generate an error.
*/
pChc = findCursorHideCount(client, pWin->drawable.pScreen);
if (pChc == NULL) {
@@ -1068,6 +1087,8 @@
{
int i;
+ CursorGloballyHidden = CursorInitiallyHidden;
+
if (party_like_its_1989)
CursorVisible = EnableCursor;

View File

@ -0,0 +1,515 @@
# Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at
# http://lists.freedesktop.org/archives/xorg/2005-December/011635.html
diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/linux/evdev.c xserver/hw/kdrive/linux/evdev.c
--- xserver.original/hw/kdrive/linux/evdev.c 2005-12-16 10:36:05.000000000 -0200
+++ xserver/hw/kdrive/linux/evdev.c 2005-12-16 10:40:51.077410192 -0200
@@ -31,9 +31,11 @@
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xpoll.h>
+#include <X11/keysym.h>
#include "inputstr.h"
#include "scrnintstr.h"
#include "kdrive.h"
+#include "kkeymap.h"
#define NUM_EVENTS 128
#define ABS_UNSET -65535
@@ -105,9 +107,10 @@
{
KdMouseInfo *mi = closure;
Kevdev *ke = mi->driver;
- int i;
+ int i, j;
struct input_event events[NUM_EVENTS];
int n;
+ int flags;
n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
if (n <= 0)
@@ -115,22 +118,64 @@
n /= sizeof (struct input_event);
for (i = 0; i < n; i++)
{
+ flags = KD_MOUSE_DELTA | kdMouseInfo->buttonState;
switch (events[i].type) {
case EV_SYN:
break;
case EV_KEY:
- EvdevMotion (mi);
- ASSIGNBIT(ke->key,events[i].code, events[i].value);
- if (events[i].code < 0x100)
- ErrorF ("key %d %d\n", events[i].code, events[i].value);
- else
- ErrorF ("key 0x%x %d\n", events[i].code, events[i].value);
+ if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) {
+ switch (events[i].code) {
+ case BTN_LEFT:
+ if (events[i].value == 1)
+ flags |= KD_BUTTON_1;
+ else
+ flags &= ~KD_BUTTON_1;
+ break;
+ case BTN_MIDDLE:
+ if (events[i].value == 1)
+ flags |= KD_BUTTON_2;
+ else
+ flags &= ~KD_BUTTON_2;
+ break;
+ case BTN_RIGHT:
+ if (events[i].value == 1)
+ flags |= KD_BUTTON_3;
+ else
+ flags &= ~KD_BUTTON_3;
+ break;
+ default:
+ /* Unknow button */
+ break;
+ }
+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
+ }
break;
case EV_REL:
- ke->rel[events[i].code] += events[i].value;
+ if (events[i].code == REL_X) {
+ KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0);
+ }
+ else if (events[i].code == REL_Y) {
+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value);
+ }
+ else if (events[i].code == REL_WHEEL) {
+ for (j = 0; j < abs (events[i].value); j++) {
+ if (events[i].value > 0)
+ flags |= KD_BUTTON_4;
+ else
+ flags |= KD_BUTTON_5;
+
+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
+
+ if (events[i].value > 0)
+ flags &= ~KD_BUTTON_4;
+ else
+ flags &= ~KD_BUTTON_5;
+
+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
+ } /* events[i].code == REL_WHEEL */
+ }
break;
case EV_ABS:
- ke->abs[events[i].code] = events[i].value;
break;
}
}
@@ -173,6 +218,12 @@
fd = open (kdefaultEvdev[i], 2);
if (fd >= 0)
{
+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
+ {
+ close (fd);
+ continue;
+ }
+
mi->name = KdSaveString (kdefaultEvdev[i]);
break;
}
@@ -287,7 +338,319 @@
EvdevFini,
};
-#if 0
+/* Keyboard */
+
+int kbd_fd = -1;
+int EvdevInputType = 0;
+
+KeySym evdevKeymap[(194 - 1 + 1) * 2] = {
+/* These are directly mapped from DOS scanset 0 */
+/* 1 8 */ XK_Escape, NoSymbol,
+/* 2 9 */ XK_1, XK_exclam,
+/* 3 10 */ XK_2, XK_at,
+/* 4 11 */ XK_3, XK_numbersign,
+/* 5 12 */ XK_4, XK_dollar,
+/* 6 13 */ XK_5, XK_percent,
+/* 7 14 */ XK_6, XK_asciicircum,
+/* 8 15 */ XK_7, XK_ampersand,
+/* 9 16 */ XK_8, XK_asterisk,
+/* 10 17 */ XK_9, XK_parenleft,
+/* 11 18 */ XK_0, XK_parenright,
+/* 12 19 */ XK_minus, XK_underscore,
+/* 13 20 */ XK_equal, XK_plus,
+/* 14 21 */ XK_BackSpace, NoSymbol,
+/* 15 22 */ XK_Tab, NoSymbol,
+/* 16 23 */ XK_Q, NoSymbol,
+/* 17 24 */ XK_W, NoSymbol,
+/* 18 25 */ XK_E, NoSymbol,
+/* 19 26 */ XK_R, NoSymbol,
+/* 20 27 */ XK_T, NoSymbol,
+/* 21 28 */ XK_Y, NoSymbol,
+/* 22 29 */ XK_U, NoSymbol,
+/* 23 30 */ XK_I, NoSymbol,
+/* 24 31 */ XK_O, NoSymbol,
+/* 25 32 */ XK_P, NoSymbol,
+/* 26 33 */ XK_bracketleft, XK_braceleft,
+/* 27 34 */ XK_bracketright, XK_braceright,
+/* 28 35 */ XK_Return, NoSymbol,
+/* 29 36 */ XK_Control_L, NoSymbol,
+/* 30 37 */ XK_A, NoSymbol,
+/* 31 38 */ XK_S, NoSymbol,
+/* 32 39 */ XK_D, NoSymbol,
+/* 33 40 */ XK_F, NoSymbol,
+/* 34 41 */ XK_G, NoSymbol,
+/* 35 42 */ XK_H, NoSymbol,
+/* 36 43 */ XK_J, NoSymbol,
+/* 37 44 */ XK_K, NoSymbol,
+/* 38 45 */ XK_L, NoSymbol,
+/* 39 46 */ XK_semicolon, XK_colon,
+/* 40 47 */ XK_apostrophe, XK_quotedbl,
+/* 41 48 */ XK_grave, XK_asciitilde,
+/* 42 49 */ XK_Shift_L, NoSymbol,
+/* 43 50 */ XK_backslash, XK_bar,
+/* 44 51 */ XK_Z, NoSymbol,
+/* 45 52 */ XK_X, NoSymbol,
+/* 46 53 */ XK_C, NoSymbol,
+/* 47 54 */ XK_V, NoSymbol,
+/* 48 55 */ XK_B, NoSymbol,
+/* 49 56 */ XK_N, NoSymbol,
+/* 50 57 */ XK_M, NoSymbol,
+/* 51 58 */ XK_comma, XK_less,
+/* 52 59 */ XK_period, XK_greater,
+/* 53 60 */ XK_slash, XK_question,
+/* 54 61 */ XK_Shift_R, NoSymbol,
+/* 55 62 */ XK_KP_Multiply, NoSymbol,
+/* 56 63 */ XK_Alt_L, XK_Meta_L,
+/* 57 64 */ XK_space, NoSymbol,
+/* 58 65 */ XK_Caps_Lock, NoSymbol,
+/* 59 66 */ XK_F1, NoSymbol,
+/* 60 67 */ XK_F2, NoSymbol,
+/* 61 68 */ XK_F3, NoSymbol,
+/* 62 69 */ XK_F4, NoSymbol,
+/* 63 70 */ XK_F5, NoSymbol,
+/* 64 71 */ XK_F6, NoSymbol,
+/* 65 72 */ XK_F7, NoSymbol,
+/* 66 73 */ XK_F8, NoSymbol,
+/* 67 74 */ XK_F9, NoSymbol,
+/* 68 75 */ XK_F10, NoSymbol,
+/* 69 76 */ XK_Break, XK_Pause,
+/* 70 77 */ XK_Scroll_Lock, NoSymbol,
+/* 71 78 */ XK_KP_Home, XK_KP_7,
+/* 72 79 */ XK_KP_Up, XK_KP_8,
+/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
+/* 74 81 */ XK_KP_Subtract, NoSymbol,
+/* 75 82 */ XK_KP_Left, XK_KP_4,
+/* 76 83 */ XK_KP_5, NoSymbol,
+/* 77 84 */ XK_KP_Right, XK_KP_6,
+/* 78 85 */ XK_KP_Add, NoSymbol,
+/* 79 86 */ XK_KP_End, XK_KP_1,
+/* 80 87 */ XK_KP_Down, XK_KP_2,
+/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
+/* 82 89 */ XK_KP_Insert, XK_KP_0,
+/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
+/* 84 91 */ NoSymbol, NoSymbol,
+/* 85 92 */ NoSymbol, NoSymbol,
+/* 86 93 */ NoSymbol, NoSymbol,
+/* 87 94 */ XK_F11, NoSymbol,
+/* 88 95 */ XK_F12, NoSymbol,
+
+/* These are remapped from the extended set (using ExtendMap) */
+
+/* 89 96 */ XK_Control_R, NoSymbol,
+/* 90 97 */ XK_KP_Enter, NoSymbol,
+/* 91 98 */ XK_KP_Divide, NoSymbol,
+/* 92 99 */ XK_Sys_Req, XK_Print,
+/* 93 100 */ XK_Alt_R, XK_Meta_R,
+/* 94 101 */ XK_Num_Lock, NoSymbol,
+/* 95 102 */ XK_Home, NoSymbol,
+/* 96 103 */ XK_Up, NoSymbol,
+/* 97 104 */ XK_Page_Up, NoSymbol,
+/* 98 105 */ XK_Left, NoSymbol,
+/* 99 106 */ XK_Right, NoSymbol,
+/* 100 107 */ XK_End, NoSymbol,
+/* 101 108 */ XK_Down, NoSymbol,
+/* 102 109 */ XK_Page_Down, NoSymbol,
+/* 103 110 */ XK_Insert, NoSymbol,
+/* 104 111 */ XK_Delete, NoSymbol,
+/* 105 112 */ XK_Super_L, NoSymbol,
+/* 106 113 */ XK_Super_R, NoSymbol,
+/* 107 114 */ XK_Menu, NoSymbol,
+/* 108 115 */ NoSymbol, NoSymbol,
+/* 109 116 */ NoSymbol, NoSymbol,
+/* 110 117 */ NoSymbol, NoSymbol,
+/* 111 118 */ NoSymbol, NoSymbol,
+/* 112 119 */ NoSymbol, NoSymbol,
+
+/* 113 120 */ NoSymbol, NoSymbol,
+/* 114 121 */ NoSymbol, NoSymbol,
+/* 115 122 */ NoSymbol, NoSymbol,
+/* 116 123 */ NoSymbol, NoSymbol,
+/* 117 124 */ NoSymbol, NoSymbol,
+/* 118 125 */ NoSymbol, NoSymbol,
+/* 119 126 */ NoSymbol, NoSymbol,
+/* 120 127 */ NoSymbol, NoSymbol,
+/* 121 128 */ NoSymbol, NoSymbol,
+/* 122 129 */ NoSymbol, NoSymbol,
+/* 123 130 */ NoSymbol, NoSymbol,
+/* 124 131 */ NoSymbol, NoSymbol,
+/* 125 132 */ NoSymbol, NoSymbol,
+/* 126 133 */ NoSymbol, NoSymbol,
+/* 127 134 */ NoSymbol, NoSymbol,
+/* 128 135 */ NoSymbol, NoSymbol,
+/* 129 136 */ NoSymbol, NoSymbol,
+/* 130 137 */ NoSymbol, NoSymbol,
+/* 131 138 */ NoSymbol, NoSymbol,
+/* 132 139 */ NoSymbol, NoSymbol,
+/* 133 140 */ NoSymbol, NoSymbol,
+/* 134 141 */ NoSymbol, NoSymbol,
+/* 135 142 */ NoSymbol, NoSymbol,
+/* 136 143 */ NoSymbol, NoSymbol,
+/* 137 144 */ NoSymbol, NoSymbol,
+/* 138 145 */ NoSymbol, NoSymbol,
+/* 139 146 */ NoSymbol, NoSymbol,
+/* 140 147 */ NoSymbol, NoSymbol,
+/* 141 148 */ NoSymbol, NoSymbol,
+/* 142 149 */ NoSymbol, NoSymbol,
+/* 143 150 */ NoSymbol, NoSymbol,
+/* 144 151 */ NoSymbol, NoSymbol,
+/* 145 152 */ NoSymbol, NoSymbol,
+/* 146 153 */ NoSymbol, NoSymbol,
+/* 147 154 */ NoSymbol, NoSymbol,
+/* 148 155 */ NoSymbol, NoSymbol,
+/* 149 156 */ NoSymbol, NoSymbol,
+/* 150 157 */ NoSymbol, NoSymbol,
+/* 151 158 */ NoSymbol, NoSymbol,
+/* 152 159 */ NoSymbol, NoSymbol,
+/* 153 160 */ NoSymbol, NoSymbol,
+/* 154 161 */ NoSymbol, NoSymbol,
+/* 155 162 */ NoSymbol, NoSymbol,
+/* 156 163 */ NoSymbol, NoSymbol,
+/* 157 164 */ NoSymbol, NoSymbol,
+/* 158 165 */ NoSymbol, NoSymbol,
+/* 159 166 */ NoSymbol, NoSymbol,
+/* 160 167 */ NoSymbol, NoSymbol,
+/* 161 168 */ NoSymbol, NoSymbol,
+/* 162 169 */ NoSymbol, NoSymbol,
+/* 163 170 */ NoSymbol, NoSymbol,
+/* 164 171 */ NoSymbol, NoSymbol,
+/* 165 172 */ NoSymbol, NoSymbol,
+/* 166 173 */ NoSymbol, NoSymbol,
+/* 167 174 */ NoSymbol, NoSymbol,
+/* 168 175 */ NoSymbol, NoSymbol,
+/* 169 176 */ NoSymbol, NoSymbol,
+/* 170 177 */ NoSymbol, NoSymbol,
+/* 171 178 */ NoSymbol, NoSymbol,
+/* 172 179 */ NoSymbol, NoSymbol,
+/* 173 180 */ NoSymbol, NoSymbol,
+/* 174 181 */ NoSymbol, NoSymbol,
+/* 175 182 */ NoSymbol, NoSymbol,
+/* 176 183 */ NoSymbol, NoSymbol,
+/* 177 184 */ NoSymbol, NoSymbol,
+/* 178 185 */ NoSymbol, NoSymbol,
+/* 179 186 */ NoSymbol, NoSymbol,
+/* 180 187 */ NoSymbol, NoSymbol,
+/* 181 188 */ NoSymbol, NoSymbol,
+/* 182 189 */ NoSymbol, NoSymbol,
+/* 183 190 */ NoSymbol, NoSymbol,
+/* 184 191 */ NoSymbol, NoSymbol,
+/* 185 192 */ NoSymbol, NoSymbol,
+/* 186 193 */ NoSymbol, NoSymbol,
+/* 187 194 */ NoSymbol, NoSymbol,
+/* 188 195 */ NoSymbol, NoSymbol,
+/* 189 196 */ NoSymbol, NoSymbol,
+/* 190 197 */ NoSymbol, NoSymbol,
+/* 191 198 */ NoSymbol, NoSymbol,
+/* 192 199 */ NoSymbol, NoSymbol,
+/* 193 200 */ NoSymbol, NoSymbol,
+/* 194 201 */ NoSymbol, NoSymbol,
+};
+
+static void
+EvdevKbdRead (int fd, void *closure)
+{
+ int i, n;
+ struct input_event events[NUM_EVENTS];
+
+ n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event));
+ if (n <= 0)
+ return;
+
+ n /= sizeof (struct input_event);
+
+ for (i = 0; i < n; i++)
+ {
+ if (events[i].type == EV_KEY)
+ KdEnqueueKeyboardEvent (events[i].code, !events[i].value);
+ }
+}
+
+static void
+EvdevKbdLoad (void)
+{
+ kdMinScanCode = 0;
+ kdMaxScanCode = 193;
+ kdKeymapWidth = 2;
+ memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap));
+}
+
+static int
+EvdevKbdInit (void)
+{
+ int fd, i;
+
+ if (!EvdevInputType)
+ EvdevInputType = KdAllocInputType ();
+
+ if (!kdKeyboard)
+ {
+ for (i = 0; i < NUM_DEFAULT_EVDEV; i++)
+ {
+ fd = open (kdefaultEvdev[i], 2);
+ if (fd >= 0)
+ {
+ kdKeyboard = KdSaveString (kdefaultEvdev[i]);
+ break;
+ }
+ }
+ }
+ else
+ {
+ fd = open (kdKeyboard, O_RDWR);
+ if (fd < 0)
+ return FALSE;
+ }
+
+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
+ {
+ close (fd);
+ return FALSE;
+ }
+
+ if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL))
+ return FALSE;
+
+ kbd_fd = fd;
+ return TRUE;
+}
+
+static void
+EvdevKbdFini (void)
+{
+}
+
+static void
+EvdevKbdLeds (int leds)
+{
+ struct input_event event;
+
+ memset(&event, 0, sizeof(event));
+
+ event.type = EV_LED;
+ event.code = LED_CAPSL;
+ event.value = leds & (1 << 0) ? 1 : 0;
+ write(kbd_fd, (char *) &event, sizeof(event));
+
+ event.type = EV_LED;
+ event.code = LED_NUML;
+ event.value = leds & (1 << 1) ? 1 : 0;
+ write(kbd_fd, (char *) &event, sizeof(event));
+
+ event.type = EV_LED;
+ event.code = LED_SCROLLL;
+ event.value = leds & (1 << 2) ? 1 : 0;
+ write(kbd_fd, (char *) &event, sizeof(event));
+
+ event.type = EV_LED;
+ event.code = LED_COMPOSE;
+ event.value = leds & (1 << 3) ? 1 : 0;
+ write(kbd_fd, (char *) &event, sizeof(event));
+}
+
+static void
+EvdevKbdBell (int volume, int frequency, int duration)
+{
+}
+
KdKeyboardFuncs LinuxEvdevKeyboardFuncs = {
EvdevKbdLoad,
EvdevKbdInit,
@@ -296,4 +659,4 @@
EvdevKbdFini,
0,
};
-#endif
+
diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.c xserver/hw/kdrive/src/kdrive.c
--- xserver.original/hw/kdrive/src/kdrive.c 2005-12-16 10:36:07.000000000 -0200
+++ xserver/hw/kdrive/src/kdrive.c 2005-12-16 10:37:09.000000000 -0200
@@ -73,6 +73,7 @@
Bool kdEnabled;
int kdSubpixelOrder;
int kdVirtualTerminal = -1;
+char *kdKeyboard = 0;
Bool kdSwitchPending;
char *kdSwitchCmd;
DDXPointRec kdOrigin;
@@ -795,6 +796,14 @@
UseMsg ();
return 2;
}
+ if (!strcmp (argv[i], "-keyboard"))
+ {
+ if ((i+1) < argc)
+ kdKeyboard = argv[i+1];
+ else
+ UseMsg ();
+ return 2;
+ }
if (!strcmp (argv[i], "-rgba"))
{
if ((i+1) < argc)
diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.h xserver/hw/kdrive/src/kdrive.h
--- xserver.original/hw/kdrive/src/kdrive.h 2005-12-16 10:36:07.000000000 -0200
+++ xserver/hw/kdrive/src/kdrive.h 2005-12-16 10:37:09.000000000 -0200
@@ -416,6 +416,7 @@
extern Bool kdDisableZaphod;
extern Bool kdDontZap;
extern int kdVirtualTerminal;
+extern char *kdKeyboard;
extern char *kdSwitchCmd;
extern KdOsFuncs *kdOsFuncs;
@@ -769,7 +770,7 @@
ProcessInputEvents (void);
extern KdMouseFuncs LinuxMouseFuncs;
-extern KdMouseFuncs LinuxEvdevFuncs;
+extern KdMouseFuncs LinuxEvdevMouseFuncs;
extern KdMouseFuncs Ps2MouseFuncs;
extern KdMouseFuncs BusMouseFuncs;
extern KdMouseFuncs MsMouseFuncs;
@@ -777,6 +778,7 @@
extern KdMouseFuncs TsFuncs;
#endif
extern KdKeyboardFuncs LinuxKeyboardFuncs;
+extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
extern KdOsFuncs LinuxFuncs;
extern KdMouseFuncs VxWorksMouseFuncs;
diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kinput.c xserver/hw/kdrive/src/kinput.c
--- xserver.original/hw/kdrive/src/kinput.c 2005-12-16 10:36:07.000000000 -0200
+++ xserver/hw/kdrive/src/kinput.c 2005-12-16 10:37:09.000000000 -0200
@@ -1300,6 +1300,7 @@
xE.u.u.type = KeyPress;
xE.u.u.detail = key_code;
+#ifndef XKB
switch (KEYCOL1(key_code))
{
case XK_Num_Lock:
@@ -1313,6 +1314,7 @@
else
xE.u.u.type = KeyPress;
}
+#endif
/*
* Check pressed keys which are already down

View File

@ -0,0 +1,54 @@
--- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100
+++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100
@@ -28,6 +28,8 @@
#endif
#include <fbdev.h>
+extern int use_evdev;
+
void
InitCard (char *name)
{
@@ -45,7 +47,10 @@
void
InitInput (int argc, char **argv)
{
- KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
+ if (use_evdev)
+ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
+ else
+ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
#ifdef TOUCHSCREEN
KdAddMouseDriver (&TsFuncs);
#endif
--- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
+++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100
@@ -44,6 +44,8 @@
#include "dpmsproc.h"
#endif
+int use_evdev = 0;
+
typedef struct _kdDepths {
CARD8 depth;
CARD8 bpp;
@@ -687,6 +689,7 @@
ErrorF("-videoTest Start the server, pause momentarily and exit\n");
ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
+ ErrorF("-use-evdev Use Linux evdev input\n");
ErrorF("-switchCmd Command to execute on vt switch\n");
ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
@@ -796,6 +799,11 @@
UseMsg ();
return 2;
}
+ if (!strcmp (argv[i], "-use-evdev"))
+ {
+ use_evdev = 1;
+ return 1;
+ }
if (!strcmp (argv[i], "-keyboard"))
{
if ((i+1) < argc)

View File

@ -0,0 +1,13 @@
--- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700
+++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700
@@ -927,8 +927,10 @@ char *kdefaultMouse[] = {
"/dev/psaux",
"/dev/input/mice",
"/dev/adbmouse",
+#ifdef BREAK_MY_SERIAL_CONSOLE
"/dev/ttyS0",
"/dev/ttyS1",
+#endif
};
#define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0]))

View File

@ -1,9 +1,9 @@
Index: xorg-server-1.4/Makefile.am
Index: xorg-server-1.2.0/Makefile.am
===================================================================
--- xorg-server-1.4.orig/Makefile.am 2007-08-23 21:04:52.000000000 +0200
+++ xorg-server-1.4/Makefile.am 2007-09-06 23:19:59.000000000 +0200
@@ -26,6 +26,10 @@
GLX_DIR=GL
--- xorg-server-1.2.0.orig/Makefile.am 2007-01-23 06:39:15.000000000 +0100
+++ xorg-server-1.2.0/Makefile.am 2007-03-28 20:26:19.000000000 +0200
@@ -30,6 +30,10 @@
XINPUT_DIR=Xi
endif
+if XKB
@ -13,28 +13,28 @@ Index: xorg-server-1.4/Makefile.am
if DBE
DBE_DIR=dbe
endif
@@ -42,7 +46,7 @@
@@ -46,7 +50,7 @@
randr \
render \
Xi \
$(XINPUT_DIR) \
- xkb \
+ $(XKB_DIR) \
$(DBE_DIR) \
$(MFB_DIR) \
$(AFB_DIR) \
Index: xorg-server-1.4/configure.ac
Index: xorg-server-1.2.0/configure.ac
===================================================================
--- xorg-server-1.4.orig/configure.ac 2007-09-06 07:59:00.000000000 +0200
+++ xorg-server-1.4/configure.ac 2007-09-06 23:19:19.000000000 +0200
@@ -514,6 +514,7 @@
AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
--- xorg-server-1.2.0.orig/configure.ac 2007-01-23 06:39:15.000000000 +0100
+++ xorg-server-1.2.0/configure.ac 2007-03-28 20:27:13.000000000 +0200
@@ -428,6 +428,7 @@
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
dnl DDXes.
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -889,12 +890,15 @@
@@ -754,12 +755,15 @@
AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
@ -55,4 +55,4 @@ Index: xorg-server-1.4/configure.ac
+fi
AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
[Do not have 'strcasecmp'.]))
[Do not have `strcasecmp'.]))

View File

@ -46,6 +46,7 @@ DESCRIPTION_xserver-kdrive-vesa = "X server from freedesktop.org, supporting any
DESCRIPTION_xserver-kdrive-via = "X server from freedesktop.org, supporting VIA chipsets"
FILES_${PN} += "${libdir}/xserver/SecurityPolicy"
ALLOW_EMPTY_${PN} = "1"
FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
FILES_xserver-kdrive-fake = "${bindir}/Xfake"

View File

@ -1,28 +0,0 @@
require xserver-kdrive.inc
DEPENDS += "libxkbfile libxcalibrate"
PE = "1"
PR = "r22"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://extra-kmodes.patch;patch=1 \
file://fbdev_use_current.patch;patch=1;status=merged \
file://disable-apm.patch;patch=1 \
file://no-serial-probing.patch;patch=1 \
file://kdrive-evdev.patch;patch=1 \
file://kdrive-use-evdev.patch;patch=1 \
file://enable-builtin-fonts.patch;patch=1 \
file://disable-xf86-dga-xorgcfg.patch;patch=1 \
file://optional-xkb.patch;patch=1 \
file://enable-epson.patch;patch=1;status=merged \
file://enable-tslib.patch;patch=1;status=merged \
file://enable-xcalibrate.patch;patch=1 \
file://hide-cursor-and-ppm-root.patch;patch=1 \
file://xcalibrate_coords.patch;patch=1 \
file://fbdev_xrandr_ioctl.patch;patch=1 \
file://scheduler.patch;patch=1 \
file://fix-newer-xorg-headers.patch;patch=1 \
file://report-correct-randr12.patch;patch=1 "
S = "${WORKDIR}/xorg-server-${PV}"

View File

@ -1,41 +0,0 @@
require xserver-kdrive.inc
DEPENDS += "hal libxkbfile libxcalibrate pixman"
DEFAULT_PREFERENCE = "-99"
PE = "1"
PR = "r4"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://extra-kmodes.patch;patch=1 \
file://disable-apm.patch;patch=1 \
file://no-serial-probing.patch;patch=1 \
file://fbdev-not-fix.patch;patch=1 \
file://optional-xkb.patch;patch=1 \
file://enable-tslib.patch;patch=1;status=merged \
file://enable-epson.patch;patch=1;status=merged \
# file://hide-cursor-and-ppm-root.patch;patch=1 \
# file://xcalibrate_coords.patch;patch=1 \
file://w100.patch;patch=1 \
file://w100-autofoo.patch;patch=1 \
file://w100-fix-offscreen-bmp.patch;patch=1 \
file://w100-new-input-world-order.patch;patch=1 \
file://linux-keyboard-mediumraw.patch;patch=1;status=merged \
file://xcalibrate-new-input-world-order.patch;patch=1 \
file://tslib-default-device.patch;patch=1;status=merged \
# file://fbdev-evdev.patch;patch=1 \
file://keyboard-resume-workaround.patch;patch=1 \
file://xorg-avr32-support.diff;patch=1;status=merged \
# file://pkgconfig_fix.patch;patch=1 \
file://no_xkb.patch;patch=1;pnum=0;status=merged \
"
S = "${WORKDIR}/xorg-server-${PV}"
W100_OECONF = "--disable-w100"
#W100_OECONF_arm = "--enable-w100"
EXTRA_OECONF += "--enable-builtin-fonts \
--disable-dri2 \
"

View File

@ -0,0 +1,27 @@
require xserver-kdrive.inc
DEPENDS += "libxkbfile libxcalibrate font-util"
RDEPENDS_${PN} += "xkeyboard-config"
EXTRA_OECONF += "--disable-glx"
PE = "1"
PR = "r23"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://extra-kmodes.patch;patch=1 \
file://disable-apm.patch;patch=1 \
file://no-serial-probing.patch;patch=1 \
# file://kdrive-evdev.patch;patch=1 \
# file://kdrive-use-evdev.patch;patch=1 \
# file://enable-builtin-fonts.patch;patch=1 \
# file://disable-xf86-dga-xorgcfg.patch;patch=1 \
# file://optional-xkb.patch;patch=1 \
file://enable-xcalibrate.patch;patch=1 \
file://hide-cursor-and-ppm-root.patch;patch=1 \
file://fbdev_xrandr_ioctl.patch;patch=1 \
file://fix-newer-xorg-headers.patch;patch=1 \
file://crosscompile.patch;patch=1"
S = "${WORKDIR}/xorg-server-${PV}"