if (ModifierState == 0)
{
- UserEnterExclusive();
if (fsModifiers == MOD_WIN)
IntKeyboardSendWinKeyMsg();
else if (fsModifiers == MOD_ALT)
}
co_IntKeyboardSendAltKeyMsg();
}
- UserLeave();
continue;
}
}
}
- UserEnterExclusive();
-
for (;NumKeys;memcpy(&KeyInput, &NextKeyInput, sizeof(KeyInput)),
NumKeys--)
{
*/
co_MsqPostKeyboardMessage(msg.message,msg.wParam,msg.lParam);
}
-
- UserLeave();
}
KeyboardEscape:
LARGE_INTEGER LargeTickCount;
KBDLLHOOKSTRUCT KbdHookData;
WORD flags, wVkStripped, wVkL, wVkR, wVk = ki->wVk, vk_hook = ki->wVk;
+ BOOLEAN Entered = FALSE;
Msg.lParam = 0;
- // Condition may arise when calling MsqPostMessage and waiting for an event.
- ASSERT (UserIsEntered());
+ // Condition may arise when calling MsqPostMessage and waiting for an event.
+ if (!UserIsEntered())
+ {
+ // Fixme: Not sure ATM if this thread is locked.
+ UserEnterExclusive();
+ Entered = TRUE;
+ }
wVk = LOBYTE(wVk);
Msg.wParam = wVk;
{
DPRINT1("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n",
Msg.message, vk_hook, Msg.lParam);
-
+ if (Entered) UserLeave();
return FALSE;
}
if (FocusMessageQueue == NULL)
{
DPRINT("No focus message queue\n");
-
+ if (Entered) UserLeave();
return FALSE;
}
DPRINT("Invalid focus window handle\n");
}
+ if (Entered) UserLeave();
+
return TRUE;
}