wintab: lcOutExtX and Y values are not initialized

Eriks Dobelis eriks.dobelis at biti.lv
Mon Mar 24 03:09:46 CDT 2014


This is one of the patches to fix 
http://bugs.winehq.org/show_bug.cgi?id=18517 and enable pressure 
sensitivity in Photoshop CS4+

Values of lcOutExtX and lcOutExtY are currently initialized to 0. Some 
software (e.g. Photoshop CS4) gets confused and does not change the 
values. lcOutExt? values are used in scaling x and y values, which means 
they are afterwards scaled to 0 in all packets.

If lcOutExt? values are initialized then Photoshop CS4 changes the 
values during opening of the device, and afterwards x and y are set to 
usable values in packets.

  dlls/winex11.drv/wintab.c | 2 ++
  1 file changed, 2 insertions(+)



-------------- next part --------------
>From ae460595154a94cc65448c40bbfb4735bc066cb8 Mon Sep 17 00:00:00 2001
From: Eriks Dobelis <eriks.dobelis at biti.lv>
Date: Thu, 20 Mar 2014 16:18:17 +0200
Subject: [PATCH 2/5] Initialize lcOutExtX/Y to sensible values

---
 dlls/winex11.drv/wintab.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index 23a5423..a1aae49 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -538,6 +538,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);
 
     /* initialize cursors */
     disable_system_cursors();
-- 
1.8.3.2



More information about the wine-patches mailing list