mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:26:17 +00:00
[Win32k]
- Fix more wine msg test_hotkey tests, down to seven. svn path=/trunk/; revision=60677
This commit is contained in:
parent
1293634a06
commit
5dc2b87394
1 changed files with 20 additions and 10 deletions
|
@ -195,7 +195,8 @@ co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
|
||||||
|
|
||||||
if (pHotKey)
|
if (pHotKey)
|
||||||
{
|
{
|
||||||
TRACE("Hot key Found\n");
|
TRACE("Hot key pressed (pWnd %p, id %d)\n", pHotKey->pWnd, pHotKey->id);
|
||||||
|
|
||||||
/* FIXME: See comment about "UserDebuggerHotKey" on top of this file. */
|
/* FIXME: See comment about "UserDebuggerHotKey" on top of this file. */
|
||||||
if (pHotKey->id == IDHK_SHIFTF12 || pHotKey->id == IDHK_F12)
|
if (pHotKey->id == IDHK_SHIFTF12 || pHotKey->id == IDHK_F12)
|
||||||
{
|
{
|
||||||
|
@ -210,8 +211,6 @@ co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
|
||||||
/* Process hotkey if it is key up event */
|
/* Process hotkey if it is key up event */
|
||||||
if (!bIsDown)
|
if (!bIsDown)
|
||||||
{
|
{
|
||||||
TRACE("Hot key pressed (pWnd %p, id %d)\n", pHotKey->pWnd, pHotKey->id);
|
|
||||||
|
|
||||||
/* WIN and F12 keys are not hardcoded here. See comments on top of this file. */
|
/* WIN and F12 keys are not hardcoded here. See comments on top of this file. */
|
||||||
if (pHotKey->id == IDHK_WINKEY && bWinHotkeyActive == TRUE)
|
if (pHotKey->id == IDHK_WINKEY && bWinHotkeyActive == TRUE)
|
||||||
{
|
{
|
||||||
|
@ -222,15 +221,27 @@ co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
|
||||||
UserPostMessage(UserHMGetHandle(pWnd), WM_SYSCOMMAND, SC_TASKLIST, 0);
|
UserPostMessage(UserHMGetHandle(pWnd), WM_SYSCOMMAND, SC_TASKLIST, 0);
|
||||||
//ptiLastInput = pWnd->head.pti;
|
//ptiLastInput = pWnd->head.pti;
|
||||||
bWinHotkeyActive = FALSE;
|
bWinHotkeyActive = FALSE;
|
||||||
return TRUE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ /* The user pressed the win key */
|
||||||
|
if (pHotKey->id == IDHK_WINKEY)
|
||||||
|
{
|
||||||
|
bWinHotkeyActive = TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bIsDown)
|
||||||
|
{
|
||||||
if (!pHotKey->pWnd)
|
if (!pHotKey->pWnd)
|
||||||
{
|
{
|
||||||
TRACE("UPTM Hot key Id %d Key %d\n",pHotKey->id, wVk );
|
TRACE("UPTM Hot key Id %d Key %d\n",pHotKey->id, wVk );
|
||||||
UserPostThreadMessage(pHotKey->pti, WM_HOTKEY, pHotKey->id, MAKELONG(fModifiers, wVk));
|
UserPostThreadMessage(pHotKey->pti, WM_HOTKEY, pHotKey->id, MAKELONG(fModifiers, wVk));
|
||||||
//ptiLastInput = pHotKey->pti;
|
//ptiLastInput = pHotKey->pti;
|
||||||
|
return TRUE; /* Don't send any message */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -248,23 +259,22 @@ co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
|
||||||
pWnd = pHotKey->pWnd;
|
pWnd = pHotKey->pWnd;
|
||||||
}
|
}
|
||||||
if (pWnd)
|
if (pWnd)
|
||||||
{
|
{ // pWnd->head.rpdesk->pDeskInfo->spwndShell needs testing.
|
||||||
if (pWnd == pWnd->head.rpdesk->pDeskInfo->spwndShell && pHotKey->id == SC_TASKLIST)
|
if (pWnd == ValidateHwndNoErr(InputWindowStation->ShellWindow) && pHotKey->id == SC_TASKLIST)
|
||||||
{
|
{
|
||||||
ERR("Sending to shell window w/o IDHK_WINKEY..\n");
|
ERR("Sending to shell window w/o IDHK_WINKEY..\n");
|
||||||
UserPostMessage(UserHMGetHandle(pWnd), WM_SYSCOMMAND, SC_TASKLIST, 0);
|
UserPostMessage(UserHMGetHandle(pWnd), WM_SYSCOMMAND, SC_TASKLIST, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
TRACE("UPM Hot key Id %d Key %d\n",pHotKey->id, wVk );
|
||||||
UserPostMessage(UserHMGetHandle(pWnd), WM_HOTKEY, pHotKey->id, MAKELONG(fModifiers, wVk));
|
UserPostMessage(UserHMGetHandle(pWnd), WM_HOTKEY, pHotKey->id, MAKELONG(fModifiers, wVk));
|
||||||
}
|
}
|
||||||
//ptiLastInput = pWnd->head.pti;
|
//ptiLastInput = pWnd->head.pti;
|
||||||
|
return TRUE; /* Don't send any message */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE; /* Don't send any message */
|
|
||||||
}
|
}
|
||||||
else /* The user pressed the win key */
|
|
||||||
if (pHotKey->id == IDHK_WINKEY) bWinHotkeyActive = TRUE;
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -558,7 +568,7 @@ NtUserUnregisterHotKey(HWND hWnd, int id)
|
||||||
{
|
{
|
||||||
PHOT_KEY pHotKey = gphkFirst, phkNext, *pLink = &gphkFirst;
|
PHOT_KEY pHotKey = gphkFirst, phkNext, *pLink = &gphkFirst;
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
PWND pWnd;
|
PWND pWnd = NULL;
|
||||||
|
|
||||||
TRACE("Enter NtUserUnregisterHotKey\n");
|
TRACE("Enter NtUserUnregisterHotKey\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue