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) ...@@ -233,6 +233,14 @@ LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd)
return ptr; 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) int static inline CopyTabletData(LPVOID target, LPVOID src, INT size)
{ {
memcpy(target,src,size); memcpy(target,src,size);
...@@ -584,6 +592,8 @@ BOOL WINAPI WTEnable(HCTX hCtx, BOOL fEnable) ...@@ -584,6 +592,8 @@ BOOL WINAPI WTEnable(HCTX hCtx, BOOL fEnable)
EnterCriticalSection(&csTablet); EnterCriticalSection(&csTablet);
context = TABLET_FindOpenContext(hCtx); context = TABLET_FindOpenContext(hCtx);
if(!fEnable)
TABLET_FlushQueue(context);
context->enabled = fEnable; context->enabled = fEnable;
LeaveCriticalSection(&csTablet); 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