WTEnable, when called to disable tablet context, clears context queue,
as per wintab spec.
This commit is contained in:
parent
47f55d6a28
commit
68eb384366
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue