From 24aa434c53e1b648d771a6f6b5d52c2237f95383 Mon Sep 17 00:00:00 2001 From: John Klehm Date: Tue, 29 Apr 2008 00:37:55 -0500 Subject: 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 20d10e9..b98b0cd 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; -- 1.5.6.5