mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTUSER] Release modifier keys when deactivating message queue (#6754)
CORE-14768
This commit is contained in:
parent
1331e2fb02
commit
018264f38f
3 changed files with 21 additions and 0 deletions
|
@ -341,6 +341,9 @@ IntDeactivateWindow(PTHREADINFO pti, HANDLE tid)
|
|||
UserDerefObjectCo(pwndFocus);
|
||||
}
|
||||
|
||||
/* Check for keyboard modifiers and release them (CORE-14768) */
|
||||
MsqReleaseModifierKeys(pti->MessageQueue);
|
||||
|
||||
if (InAAPM) pti->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
|
||||
if (ptiCurrent != pti)
|
||||
{
|
||||
|
|
|
@ -2530,6 +2530,21 @@ MsqSetStateWindow(PTHREADINFO pti, ULONG Type, HWND hWnd)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
MsqReleaseModifierKeys(PUSER_MESSAGE_QUEUE MessageQueue)
|
||||
{
|
||||
WORD ModifierKeys[] = { VK_LCONTROL, VK_RCONTROL, VK_CONTROL,
|
||||
VK_LMENU, VK_RMENU, VK_MENU,
|
||||
VK_LSHIFT, VK_RSHIFT, VK_SHIFT };
|
||||
UINT i;
|
||||
|
||||
for (i = 0; i < _countof(ModifierKeys); ++i)
|
||||
{
|
||||
if (IS_KEY_DOWN(MessageQueue->afKeyState, ModifierKeys[i]))
|
||||
SET_KEY_DOWN(MessageQueue->afKeyState, ModifierKeys[i], FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
SHORT
|
||||
APIENTRY
|
||||
NtUserGetKeyState(INT key)
|
||||
|
|
|
@ -288,4 +288,7 @@ co_IntWaitMessage( PWND Window,
|
|||
UINT MsgFilterMin,
|
||||
UINT MsgFilterMax );
|
||||
|
||||
VOID FASTCALL
|
||||
MsqReleaseModifierKeys(PUSER_MESSAGE_QUEUE MessageQueue);
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue