Hello,
The attachment with this mail listed the difference between 0.0.5-6 and
0.0.5-7.
It provides a xorg.conf option to disable RandR support.
I uploaded 0.0.5-7 before seeing Timo's comment,
so I did not use "TrackRandr" as the option name.
Kind regards
Wen-Yen Chuang
--- xf86-input-tslib-0.0.5.orig/src/tslib.c
+++ xf86-input-tslib-0.0.5/src/tslib.c
@@ -80,6 +80,7 @@
enum button_state state;
struct timeval button_down_start;
int button_down_x,button_down_y;
+ int randr_state;
};
static void
@@ -139,8 +140,6 @@
struct ts_sample samp;
int ret;
int x,y;
- ScrnInfoPtr pScrn = xf86Screens[priv->screen_num];
- Rotation rotation = RRGetRotation(pScrn->pScreen);
struct timeval now;
while((ret = ts_read(priv->ts, &samp, 1)) == 1) {
@@ -163,21 +162,25 @@
default: break;
}
- tmp_x = samp.x;
-
- switch(rotation) {
- case RR_Rotate_90:
- samp.x = (priv->height - samp.y - 1) * priv->width / priv->height;
- samp.y = tmp_x * priv->height / priv->width;
- break;
- case RR_Rotate_180:
- samp.x = priv->width - samp.x - 1;
- samp.y = priv->height - samp.y - 1;
- break;
- case RR_Rotate_270:
- samp.x = samp.y * priv->width / priv->height;
- samp.y = (priv->width - tmp_x - 1) * priv->height / priv->width;
- break;
+ if (priv->randr_state) {
+ tmp_x = samp.x;
+ ScrnInfoPtr pScrn = xf86Screens[priv->screen_num];
+ Rotation rotation = RRGetRotation(pScrn->pScreen);
+
+ switch(rotation) {
+ case RR_Rotate_90:
+ samp.x = (priv->height - samp.y - 1) * priv->width / priv->height;
+ samp.y = tmp_x * priv->height / priv->width;
+ break;
+ case RR_Rotate_180:
+ samp.x = priv->width - samp.x - 1;
+ samp.y = priv->height - samp.y - 1;
+ break;
+ case RR_Rotate_270:
+ samp.x = samp.y * priv->width / priv->height;
+ samp.y = (priv->width - tmp_x - 1) * priv->height / priv->width;
+ break;
+ }
}
priv->lastx = samp.x;
@@ -481,6 +484,11 @@
if (xf86SetIntOption(pInfo->options, "EmulateRightButton", 0) == 0) {
priv->state = BUTTON_EMULATION_OFF;
}
+
+ priv->randr_state = 1;
+ if (xf86SetIntOption(pInfo->options, "EnableRandr", 0) == 0) {
+ priv->randr_state = 0;
+ }
/* Mark the device configured */
pInfo->flags |= XI86_CONFIGURED;
--- xf86-input-tslib-0.0.5.orig/man/tslib.man
+++ xf86-input-tslib-0.0.5/man/tslib.man
@@ -34,6 +34,7 @@
.BI " Option \*qHeight\*q \*q" "0" \*q
.BI " Option \*qRotate\*q \*q" "NONE" \*q
.BI " Option \*qEmulateRightButton\*q \*q" "0" \*q
+.BI " Option \*qEnableRandr\*q \*q" "0" \*q
\ \ ...
.B EndSection
.SH "SEE ALSO"