penmount versions: at least 1.2.0, 1.2.1 xorg: 1.3.0 the following code is incorrect: if (priv->invert_y) { y = priv->max_y - y; } if ( priv->swap_xy) { tmp = y; y = x; x = tmp; } priv->packet[0] = priv->pen_down ? 0x01 : 0x00; if (priv->reporting_mode == TS_Scaled) { x = xf86ScaleAxis (x, 0, priv->screen_width, priv->min_x , priv->max_x); y = xf86ScaleAxis (y, 0, priv->screen_height, priv->min_ y, priv->max_y); } when both SwapXY and InvertY are On, final value of x becomes: scale(max_y - y, min_x, max_x) which is incorrect - x should not depend on both max_x and max_y simultaneousely. I propose to scale first, then invert and swap. (alternatively, scale, swap, invert if that's easier to understand and both invertx and inverty are provided) Hardware where both SwapXY and InvertY are needed: iEi Afolux AFL-08A.
Created attachment 17285 [details] [review] Patch that calls swapXY before inverting and scaling the X and Y axes for the DMC9000. This patch calls swapXY before doing any axes' scaling and inverting. It does it only for the DMC9000 devices, that is where the bug was detected.
I confirm this wrong behavior. I personally think that this is a major bug, at least for us who need this feature. That's why I'm changing its priority. I'm attaching a patch that does the only solution that Dmitrii hasn't proposed :-) That is: first swapping, then inverting and scaling. I think it's the most intuitive solution to the problem, because it makes minX, maxX & co. act on the _actual_ X and Y axes, from the user/developer point of view. Anyway, the solution can be easily changed by moving the block "if ( priv->swap_xy) { ... }", as Dimitrii has clearly pointed out.
Pushed as 8a9ff94e3db692736f86d52e569f65f6f363b0e0. Thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.