Module: wine
Branch: master
Commit: 578d26f826ca863d10e5905f220c49bbccaf99e3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=578d26f826ca863d10e5905f…
Author: John Chadwick <john(a)jchw.io>
Date: Sun Nov 24 23:03:00 2019 -0800
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(a)jchw.io>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winex11.drv/wintab.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index 12eb89ac7f..ef42a1f07c 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -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)