Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#40 xf86WcmInitialCoordinates mis-reports tablet size.

Next_Release
closed
Ping Cheng
None
5
2009-03-30
2008-10-13
Jim McCann
No

in xf86Wacom.c:

if (priv->twinview == TV_LEFT_RIGHT) {
tabletSize = 2*(priv->bottomX - priv->topX - 2*priv->tvoffsetX);

I.e. if twinview is in use, assume total screen is twice the width of the tablet.

This is broken. (Consider my setup: Cintiq @ 1600x1200 next to other monitor at 1280x1024 [in a 1280x1200 panning domain].)

The result of this bug is that anything that uses xinput to get events [GIMP, notably] puts the cursor at the wrong place. (For some reason, the core events work properly, possibly due to different scaling methods.)

A hack-y fix:
(Basically: figure out the actual size of the screen by reading the screenBottomX values, then scale the reported tablet size by the ratio of this actual size to the selected screen.)

if (priv->twinview == TV_LEFT_RIGHT) {
if (priv->screen_no == -1) {
tabletSize = 2*(priv->bottomX - priv->topX - 2*priv->tvoffsetX);
ErrorF("xf86WcmInitialCoordinates: Using flawed 'twinview width = double tablet width' assumption.\n");
} else {
DBG(10, priv->debugLevel, ErrorF("trying newfangled calculation; screen_no is %d. numScreen is %d.\n", priv->screen_no, priv->numScreen));
screenMaxX = priv->screenBottomX[priv->screen_no];
for (i = 0; i < priv->numScreen; ++i) {
if (priv->screenBottomX[i] > screenMaxX) {
screenMaxX = priv->screenBottomX[i];
}
}
tabletSize = (priv->bottomX - priv->topX - 2*priv->tvoffsetX) * screenMaxX / (priv->screenBottomX[priv->screen_no] - priv->screenTopX[priv->screen_no]);
}
DBG(10, priv->debugLevel, ErrorF("tabletSize set to %d (note that tvoffsetX=%d and sizeX=%d)\n", tabletSize, priv->tvoffsetX,priv->sizeX));
}

Something similar needs to be done in the 'y' direction, but this works for my setup.

Discussion

  • Ping Cheng
    Ping Cheng
    2008-10-24

    • labels: 491257 -->
    • assigned_to: nobody --> pingc
    • status: open --> open-accepted
     
  • Ping Cheng
    Ping Cheng
    2008-10-24

    This is more of a feature request since none twinview needs this feature too. Will be considered together in the next release.

     
  • Updated in 0.8.3

     
  • Ping Cheng
    Ping Cheng
    2009-03-30

    • milestone: --> Next_Release
    • status: open-accepted --> closed