WTEnable, when called to disable tablet context, clears context queue,

as per wintab spec.
This commit is contained in:
Robert North 2005-01-24 13:36:21 +00:00 committed by Alexandre Julliard
parent 47f55d6a28
commit 68eb384366
1 changed files with 10 additions and 0 deletions

View File

@ -233,6 +233,14 @@ LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd)
return ptr;
}
/*
* Flushes all packets from the queue.
*/
static void inline TABLET_FlushQueue(LPOPENCONTEXT context)
{
context->PacketsQueued = 0;
}
int static inline CopyTabletData(LPVOID target, LPVOID src, INT size)
{
memcpy(target,src,size);
@ -584,6 +592,8 @@ BOOL WINAPI WTEnable(HCTX hCtx, BOOL fEnable)
EnterCriticalSection(&csTablet);
context = TABLET_FindOpenContext(hCtx);
if(!fEnable)
TABLET_FlushQueue(context);
context->enabled = fEnable;
LeaveCriticalSection(&csTablet);