John Klehm : wintab32: Support overlap statuses in WTEnable.

Alexandre Julliard julliard at winehq.org
Fri Sep 12 07:01:38 CDT 2008


Module: wine
Branch: master
Commit: 20276da9af2c8cf7e679edec536117d5d544462a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=20276da9af2c8cf7e679edec536117d5d544462a

Author: John Klehm <xixsimplicityxix at gmail.com>
Date:   Tue Apr 29 00:37:55 2008 -0500

wintab32: Support overlap statuses in WTEnable.

---

 dlls/wintab32/context.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c
index 5e5ada8..9b1da18 100644
--- a/dlls/wintab32/context.c
+++ b/dlls/wintab32/context.c
@@ -622,15 +622,27 @@ BOOL WINAPI WTEnable(HCTX hCtx, BOOL fEnable)
 {
     LPOPENCONTEXT context;
 
-    TRACE("(%p, %u)\n", hCtx, fEnable);
+    TRACE("hCtx=%p, fEnable=%u\n", hCtx, fEnable);
 
-    if (!hCtx) return 0;
+    if (!hCtx) return FALSE;
 
     EnterCriticalSection(&csTablet);
     context = TABLET_FindOpenContext(hCtx);
-    if(!fEnable)
+    /* if we want to enable and it is not enabled then */
+    if(fEnable && !context->enabled)
+    {
+        context->enabled = TRUE;
+        /* TODO: Add to top of overlap order */
+        context->context.lcStatus = CXS_ONTOP;
+    }
+    /* if we want to disable and it is not disabled then */
+    else if (!fEnable && context->enabled)
+    {
+        context->enabled = FALSE;
+        /* TODO: Remove from overlap order?? needs a test */
+        context->context.lcStatus = CXS_DISABLED;
         TABLET_FlushQueue(context);
-    context->enabled = fEnable;
+    }
     LeaveCriticalSection(&csTablet);
 
     return TRUE;




More information about the wine-cvs mailing list