diff options
3 files changed, 69 insertions, 1 deletions
diff --git a/packages/xorg-driver/xf86-input-tslib/01_fix-wrong-value-range-for-the-axises.diff b/packages/xorg-driver/xf86-input-tslib/01_fix-wrong-value-range-for-the-axises.diff new file mode 100644 index 0000000000..b5407102b9 --- /dev/null +++ b/packages/xorg-driver/xf86-input-tslib/01_fix-wrong-value-range-for-the-axises.diff @@ -0,0 +1,47 @@ +--- xf86-input-tslib-0.0.5.orig/src/tslib.c ++++ xf86-input-tslib-0.0.5/src/tslib.c +@@ -183,7 +185,7 @@ + { + InputInfoPtr pInfo; + unsigned char map[MAXBUTTONS + 1]; +- int i; ++ int i, axiswidth, axisheight; + struct ts_priv *priv; + + ErrorF("%s\n", __FUNCTION__); +@@ -212,17 +226,29 @@ + return !Success; + } + ++ switch(priv->rotate) { ++ case TSLIB_ROTATE_CW: ++ case TSLIB_ROTATE_CCW: ++ axiswidth = priv->height; ++ axisheight = priv->width; ++ break; ++ default: ++ axiswidth = priv->width; ++ axisheight = priv->height; ++ break; ++ } ++ + InitValuatorAxisStruct(device, 0, 0, /* min val */ +- priv->width - 1, /* max val */ +- priv->width, /* resolution */ ++ axiswidth - 1, /* max val */ ++ axiswidth, /* resolution */ + 0, /* min_res */ +- priv->width); /* max_res */ ++ axiswidth); /* max_res */ + + InitValuatorAxisStruct(device, 1, 0, /* min val */ +- priv->height - 1,/* max val */ +- priv->height, /* resolution */ ++ axisheight - 1, /* max val */ ++ axisheight, /* resolution */ + 0, /* min_res */ +- priv->height); /* max_res */ ++ axisheight); /* max_res */ + + if (InitProximityClassDeviceStruct (device) == FALSE) { + ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n"); diff --git a/packages/xorg-driver/xf86-input-tslib/dynamic-xy.patch b/packages/xorg-driver/xf86-input-tslib/dynamic-xy.patch new file mode 100644 index 0000000000..e4ff346d28 --- /dev/null +++ b/packages/xorg-driver/xf86-input-tslib/dynamic-xy.patch @@ -0,0 +1,17 @@ +Index: xf86-input-tslib-0.0.5/src/tslib.c +=================================================================== +--- xf86-input-tslib-0.0.5.orig/src/tslib.c 2008-11-11 13:48:12.000000000 +0000 ++++ xf86-input-tslib-0.0.5/src/tslib.c 2008-11-11 13:51:51.000000000 +0000 +@@ -321,10 +321,10 @@ + priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 ); + + priv->width = xf86SetIntOption(pInfo->options, "Width", 0); +- if (priv->width <= 0) priv->width = DEFAULT_WIDTH; ++ if (priv->width <= 0) priv->width = screenInfo.screens[0]->width; + + priv->height = xf86SetIntOption(pInfo->options, "Height", 0); +- if (priv->height <= 0) priv->height = DEFAULT_HEIGHT; ++ if (priv->height <= 0) priv->height = screenInfo.screens[0]->height; + + s = xf86SetStrOption(pInfo->options, "Rotate", 0); + if (s > 0) { diff --git a/packages/xorg-driver/xf86-input-tslib_0.0.5.bb b/packages/xorg-driver/xf86-input-tslib_0.0.5.bb index b8d88888ef..bed0160138 100644 --- a/packages/xorg-driver/xf86-input-tslib_0.0.5.bb +++ b/packages/xorg-driver/xf86-input-tslib_0.0.5.bb @@ -2,10 +2,14 @@ require xorg-driver-input.inc DESCRIPTION = "X.Org X server -- tslib input driver" RRECOMMENDS += "hal" -PR = "r5" +DEPENDS += "tslib" + +PR = "r6" SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2 \ file://use-hal-for-device.diff;patch=1 \ + file://01_fix-wrong-value-range-for-the-axises.diff;patch=1 \ + file://dynamic-xy.patch;patch=1 \ file://10-x11-input-tslib.fdi" do_configure_prepend() { |