Wintab32 (Patch 2 of 2) -- fix a nuber of issues with tablet queues.

Robert North 7ownq0k402 at sneakemail.com
Sat Dec 4 15:38:00 CST 2004


Changelog:
- Set the values WTInfoA returns from screen size for CTX_SYSEXTX and 
CTX_SYSEXTY context fields, to match Windows behaviour.


This results in almost acceptable tablet drawing in Painter 5, when 
combined with previous patch.

Painting with a tablet still not perfect, it exhibits some "tics", which 
I suspect are due threading issues.

Bye
	-Rob.


-------------- next part --------------
Index: dlls/wintab32/context.c
===================================================================
--- dlls/wintab32/context.c	(revision 135)
+++ dlls/wintab32/context.c	(revision 137)
@@ -343,10 +343,41 @@
  */
 UINT WINAPI WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
 {
+    UINT result;
     if (gLoaded == FALSE)
          LoadTablet();
 
-    return pWTInfoA( wCategory, nIndex, lpOutput );
+    /*
+     *  Handle system extents here, as we can use user32.dll code to set them.
+     */
+    if(wCategory == WTI_DEFSYSCTX)
+    {
+        switch(nIndex)
+        {
+            case CTX_SYSEXTX:
+                if(lpOutput != NULL)
+                    *(LONG*)lpOutput = GetSystemMetrics(SM_CXSCREEN);
+                return sizeof(LONG);
+            case CTX_SYSEXTY:
+                if(lpOutput != NULL)
+                    *(LONG*)lpOutput = GetSystemMetrics(SM_CYSCREEN);
+                return sizeof(LONG);
+           /* No action, delegate to X11Drv */
+        }
+    }
+
+    result =  pWTInfoA( wCategory, nIndex, lpOutput );
+
+    /*
+     *  Handle system extents here, as we can use user32.dll code to set them.
+     */
+    if(wCategory == WTI_DEFSYSCTX && nIndex == 0)
+    {
+        LPLOGCONTEXTA lpCtx = (LPLOGCONTEXTA)lpOutput;
+        lpCtx->lcSysExtX = GetSystemMetrics(SM_CXSCREEN);
+        lpCtx->lcSysExtY = GetSystemMetrics(SM_CYSCREEN);
+    }
+    return result;
 }
 
 /***********************************************************************


More information about the wine-patches mailing list