Commit 68eb3843 authored by Robert North's avatar Robert North Committed by Alexandre Julliard

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

as per wintab spec.
parent 47f55d6a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment