winex11/wintab: Fix values for lcSys* and lcOut*.

Testing using the Wacom wintab32 (from driver version 6.3.37-3) on
Windows 10, it appears that the values for lcOut* were likely
accidentally mixed up with the values for lcSys*. The lcSys* values are,
according to the documentation, supposed to specify the extent of the
screen mapping area for the cursor, wheras lcOut* simply specifies the
output coordinate space for the given context. There is no logical
reason I'm aware of for why lcOut* would have different default values
from lcIn*, and in testing Wacom wintab32 defaults lcOut* to match
lcIn*.

In addition, lcSysExt* should use SM_C*VIRTUALSCREEN instead of
SM_C*SCREEN, to handle multi-monitor setups properly. Setting lcSysExt*
to these values works even if the tablet is mapped to a subset of this
area.

After this change, PaintTool SAI 2 appears to work out of the box. Other
wintab clients I tested appear to be unaffected (such as the Wintab SDK
demos and Adobe Photoshop CS2.)

Signed-off-by: John Chadwick <john@jchw.io>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
John Chadwick 2019-11-24 23:03:00 -08:00 committed by Alexandre Julliard
parent 602eb52ce9
commit 578d26f826
1 changed files with 6 additions and 6 deletions

View File

@ -537,8 +537,8 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
gSysContext.lcSensZ = 65536;
gSysContext.lcSysSensX= 65536;
gSysContext.lcSysSensY= 65536;
gSysContext.lcOutExtX= GetSystemMetrics(SM_CXSCREEN);
gSysContext.lcOutExtY= GetSystemMetrics(SM_CYSCREEN);
gSysContext.lcSysExtX = GetSystemMetrics(SM_CXVIRTUALSCREEN);
gSysContext.lcSysExtY = GetSystemMetrics(SM_CYVIRTUALSCREEN);
/* initialize cursors */
disable_system_cursors();
@ -671,9 +671,9 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
gSysDevice.X.axUnits = TU_INCHES;
gSysDevice.X.axResolution = Axis->resolution;
gSysContext.lcInOrgX = Axis->min_value;
gSysContext.lcSysOrgX = Axis->min_value;
gSysContext.lcOutOrgX = Axis->min_value;
gSysContext.lcInExtX = Axis->max_value;
gSysContext.lcSysExtX = Axis->max_value;
gSysContext.lcOutExtX = Axis->max_value;
Axis++;
}
if (Val->num_axes>=2)
@ -684,9 +684,9 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
gSysDevice.Y.axUnits = TU_INCHES;
gSysDevice.Y.axResolution = Axis->resolution;
gSysContext.lcInOrgY = Axis->min_value;
gSysContext.lcSysOrgY = Axis->min_value;
gSysContext.lcOutOrgY = Axis->min_value;
gSysContext.lcInExtY = Axis->max_value;
gSysContext.lcSysExtY = Axis->max_value;
gSysContext.lcOutExtY = Axis->max_value;
Axis++;
}
if (Val->num_axes>=3)