Commit 578d26f8 authored by John Chadwick's avatar John Chadwick Committed by Alexandre Julliard

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: 's avatarJohn Chadwick <john@jchw.io> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 602eb52c
...@@ -537,8 +537,8 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault) ...@@ -537,8 +537,8 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
gSysContext.lcSensZ = 65536; gSysContext.lcSensZ = 65536;
gSysContext.lcSysSensX= 65536; gSysContext.lcSysSensX= 65536;
gSysContext.lcSysSensY= 65536; gSysContext.lcSysSensY= 65536;
gSysContext.lcOutExtX= GetSystemMetrics(SM_CXSCREEN); gSysContext.lcSysExtX = GetSystemMetrics(SM_CXVIRTUALSCREEN);
gSysContext.lcOutExtY= GetSystemMetrics(SM_CYSCREEN); gSysContext.lcSysExtY = GetSystemMetrics(SM_CYVIRTUALSCREEN);
/* initialize cursors */ /* initialize cursors */
disable_system_cursors(); disable_system_cursors();
...@@ -671,9 +671,9 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault) ...@@ -671,9 +671,9 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
gSysDevice.X.axUnits = TU_INCHES; gSysDevice.X.axUnits = TU_INCHES;
gSysDevice.X.axResolution = Axis->resolution; gSysDevice.X.axResolution = Axis->resolution;
gSysContext.lcInOrgX = Axis->min_value; gSysContext.lcInOrgX = Axis->min_value;
gSysContext.lcSysOrgX = Axis->min_value; gSysContext.lcOutOrgX = Axis->min_value;
gSysContext.lcInExtX = Axis->max_value; gSysContext.lcInExtX = Axis->max_value;
gSysContext.lcSysExtX = Axis->max_value; gSysContext.lcOutExtX = Axis->max_value;
Axis++; Axis++;
} }
if (Val->num_axes>=2) if (Val->num_axes>=2)
...@@ -684,9 +684,9 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault) ...@@ -684,9 +684,9 @@ BOOL CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
gSysDevice.Y.axUnits = TU_INCHES; gSysDevice.Y.axUnits = TU_INCHES;
gSysDevice.Y.axResolution = Axis->resolution; gSysDevice.Y.axResolution = Axis->resolution;
gSysContext.lcInOrgY = Axis->min_value; gSysContext.lcInOrgY = Axis->min_value;
gSysContext.lcSysOrgY = Axis->min_value; gSysContext.lcOutOrgY = Axis->min_value;
gSysContext.lcInExtY = Axis->max_value; gSysContext.lcInExtY = Axis->max_value;
gSysContext.lcSysExtY = Axis->max_value; gSysContext.lcOutExtY = Axis->max_value;
Axis++; Axis++;
} }
if (Val->num_axes>=3) if (Val->num_axes>=3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment