--- xf86Elo.c 2006-04-07 19:20:16.000000000 +0200 +++ xf86Elo_new.c 2007-12-19 10:09:17.000000000 +0100 @@ -712,12 +712,18 @@ int v5, int *x, int *y) { EloPrivatePtr priv = (EloPrivatePtr) local->private; + /* int width = priv->max_x - priv->min_x; + */ + int width = priv->max_x - 424; + /* int height = priv->max_y - priv->min_y; + */ + int height = priv->max_y - 524; int input_x, input_y; if (first != 0 || num != 2) { return FALSE; } @@ -730,14 +736,26 @@ } else { input_x = v0; input_y = v1; } + +/********** BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG ******/ + /* + priv->min_x works fine, but the config option MIN_X > 0 doesn't + allow to change position of Pointer to < MIN_X + maybe it is an option name conflict ? + I put my real MIN_X here, and in xorg.conf I set up Option "MIN_X" + as "0". The same with MIN_Y/ *x = (priv->screen_width * (input_x - priv->min_x)) / width; *y = (priv->screen_height - (priv->screen_height * (input_y - priv->min_y)) / height); + */ + *x = (priv->screen_width * (input_x - 424)) / width; + *y = (priv->screen_height - + (priv->screen_height * (input_y - 524)) / height); /* * MHALAS: Based on the description in xf86XInputSetScreen * this code must be called from ReadInput BEFORE any events * are posted but this method is called FROM xf86PostMotionEvent * Therefore I have moved this method into xf86EloReadInput @@ -854,22 +872,38 @@ * * We *must* generate a motion before a button change if pointer * location has changed as DIX assumes this. This is why we always * emit a motion, regardless of the kind of packet processed. */ + + +/********** BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG ******/ + /* It should be x and y (not cur_x, cur_y) xf86PostMotionEvent(local->dev, TRUE, 0, 2, cur_x, cur_y); + */ + xf86PostMotionEvent(local->dev, TRUE, 0, 2, x, y); /* * Emit a button press or release. */ if (state == ELO_PRESS || state == ELO_RELEASE) { +/********** BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG ******/ + /* It should be x and y (not cur_x, cur_y) xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, cur_x, cur_y); + */ + xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, x, y); } +/********** BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG ******/ + /* It should be x and y (not cur_x, cur_y) DBG(3, ErrorF("TouchScreen: x(%d), y(%d), %s\n", cur_x, cur_y, (state == ELO_PRESS) ? "Press" : ((state == ELO_RELEASE) ? "Release" : "Stream"))); + */ + DBG(3, ErrorF("TouchScreen: x(%d), y(%d), %s\n", + x, y, + (state == ELO_PRESS) ? "Press" : ((state == ELO_RELEASE) ? "Release" : "Stream"))); } } /*