diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-06-29 14:31:43 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-06-29 15:20:33 +0100 |
commit | 6ca31b0522873da6ae8bcdc49cbcca1b04c4016c (patch) | |
tree | 5cf314dcc613d47098c690a463fa4ebf3a72c148 /meta-extras/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch | |
parent | b6fcd71cb5b85e23036b31df1545a92f4ed402dc (diff) | |
download | openembedded-core-6ca31b0522873da6ae8bcdc49cbcca1b04c4016c.tar.gz openembedded-core-6ca31b0522873da6ae8bcdc49cbcca1b04c4016c.tar.bz2 openembedded-core-6ca31b0522873da6ae8bcdc49cbcca1b04c4016c.tar.xz openembedded-core-6ca31b0522873da6ae8bcdc49cbcca1b04c4016c.zip |
xorg-xserver: move older xserver's to meta-extras
Move xservers which are only used by retired machines to meta-extras
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta-extras/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch')
-rw-r--r-- | meta-extras/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/meta-extras/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch b/meta-extras/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch new file mode 100644 index 000000000..c5997c2ff --- /dev/null +++ b/meta-extras/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch @@ -0,0 +1,124 @@ +--- + configure |38107 ----------------------------------------------------------- + configure.ac | 2 - + hw/kdrive/linux/tslib.c | 68 ++++++++++++++++++++++++++---------------------- + 2 files changed, 39 insertions(+), 31 deletions(-) + + +Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c +=================================================================== +--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-30 00:44:13.000000000 +0000 ++++ xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c 2007-01-30 21:55:52.000000000 +0000 +@@ -47,6 +47,10 @@ + + #define TSLIB_QUEUE_SIZE 3 + ++/* For XCalibrate extension */ ++void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure); ++void *tslib_raw_event_closure; ++ + struct TslibPrivate { + int fd; + int lastx, lasty; +@@ -76,6 +80,19 @@ TsRead (int fd, void *closure) + unsigned long flags = 0; + int discard = 0; + ++ if (tslib_raw_event_hook) ++ { ++ /* XCalibrate Ext */ ++ if (ts_read_raw(private->tsDev, &event, 1) == 1) ++ { ++ tslib_raw_event_hook (event.x, ++ event.y, ++ event.pressure, ++ tslib_raw_event_closure); ++ } ++ return; ++ } ++ + if (!private->tsDev) { + DebugF("[tslib] EXTREME BADNESS: TsRead called while tsDev is null!\n"); + return; +@@ -322,14 +339,14 @@ TsRead (int fd, void *closure) + } + } + +-/* must always be NULL-terminated. */ +-char *valid_ts_names[] = { +- "ADS784x Touchscreen", +- "omap-ts", +- "TSC2301 touchscreen", +- NULL ++static char *TsNames[] = { ++ NULL, /* set via TSLIB_TSDEVICE */ ++ "/dev/ts", ++ "/dev/touchscreen/0", + }; + ++#define NUM_TS_NAMES (sizeof (TsNames) / sizeof (TsNames[0])) ++ + #define TS_NAME_SIZE 32 + + static Status +@@ -383,11 +400,10 @@ TslibDisable (KdPointerInfo *pi) + private->tsDev = NULL; + } + +- + static Status + TslibInit (KdPointerInfo *pi) + { +- int fd = 0, i = 0; ++ int fd = 0, i = 0, j = 0; + char devpath[PATH_MAX], devname[TS_NAME_SIZE]; + DIR *inputdir = NULL; + struct dirent *inputent = NULL; +@@ -397,33 +413,25 @@ TslibInit (KdPointerInfo *pi) + return !Success; + + if (!pi->path || strcmp(pi->path, "auto") == 0) { +- if (!(inputdir = opendir("/dev/input"))) { +- ErrorF("[tslib/TslibInit]: couldn't open /dev/input!\n"); +- return BadMatch; +- } + +- while ((inputent = readdir(inputdir))) { +- if (strncmp(inputent->d_name, "event", 5) != 0) +- continue; ++ if ((TsNames[0] = getenv("TSLIB_TSDEVICE")) == NULL) ++ j++; ++ ++ for (i = j; i < NUM_TS_NAMES; i++) ++ { ++ struct tsdev *tsDev; + +- snprintf(devpath, PATH_MAX, "/dev/input/%s", inputent->d_name); +- fd = open(devpath, O_RDWR); ++ if(!(tsDev = ts_open(TsNames[i], 0))) ++ continue; + +- if (!ioctl(fd, EVIOCGNAME(sizeof(devname)), devname)) { +- close(fd); ++ if (ts_config(tsDev)) + continue; +- } +- close(fd); + +- for (i = 0; valid_ts_names[i]; i++) { +- if (strcmp(devname, valid_ts_names[i]) == 0) { +- pi->path = KdSaveString(devpath); +- break; +- } +- } +- } +- +- closedir(inputdir); ++ ts_close(tsDev); ++ ++ pi->path = KdSaveString(TsNames[i]); ++ break; ++ } + } + + if (!pi->path || strcmp(pi->path, "auto") == 0) { |