mirror of
https://github.com/reactos/wine.git
synced 2025-05-13 10:56:08 +00:00
user32: Generate WM_APPCOMMAND messages for browser and multimedia keys.
This commit is contained in:
parent
00ad155a40
commit
80db3ad8bb
@ -711,6 +711,16 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||||||
case WM_HELP:
|
case WM_HELP:
|
||||||
SendMessageW( GetParent(hwnd), msg, wParam, lParam );
|
SendMessageW( GetParent(hwnd), msg, wParam, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_APPCOMMAND:
|
||||||
|
{
|
||||||
|
HWND parent = GetParent(hwnd);
|
||||||
|
if(!parent)
|
||||||
|
HOOK_CallHooks(WH_SHELL, HSHELL_APPCOMMAND, wParam, lParam, TRUE);
|
||||||
|
else
|
||||||
|
SendMessageW( parent, msg, wParam, lParam );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1636,11 +1636,12 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
|
|||||||
if (!check_hwnd_filter( msg, hwnd_filter )) return FALSE;
|
if (!check_hwnd_filter( msg, hwnd_filter )) return FALSE;
|
||||||
|
|
||||||
if (remove)
|
if (remove)
|
||||||
|
{
|
||||||
|
if((msg->message == WM_KEYDOWN) &&
|
||||||
|
(msg->hwnd != GetDesktopWindow()))
|
||||||
{
|
{
|
||||||
/* Handle F1 key by sending out WM_HELP message */
|
/* Handle F1 key by sending out WM_HELP message */
|
||||||
if ((msg->message == WM_KEYUP) &&
|
if(msg->wParam == VK_F1 &&
|
||||||
(msg->wParam == VK_F1) &&
|
|
||||||
(msg->hwnd != GetDesktopWindow()) &&
|
|
||||||
!MENU_IsMenuActive())
|
!MENU_IsMenuActive())
|
||||||
{
|
{
|
||||||
HELPINFO hi;
|
HELPINFO hi;
|
||||||
@ -1652,6 +1653,13 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
|
|||||||
hi.MousePos = msg->pt;
|
hi.MousePos = msg->pt;
|
||||||
SendMessageW( msg->hwnd, WM_HELP, 0, (LPARAM)&hi );
|
SendMessageW( msg->hwnd, WM_HELP, 0, (LPARAM)&hi );
|
||||||
}
|
}
|
||||||
|
else if(msg->wParam >= VK_BROWSER_BACK &&
|
||||||
|
msg->wParam <= VK_LAUNCH_APP2)
|
||||||
|
{
|
||||||
|
/* FIXME: Process keystate */
|
||||||
|
SendMessageW(msg->hwnd, WM_APPCOMMAND, (WPARAM)msg->hwnd, MAKELPARAM(0, (FAPPCOMMAND_KEY | (msg->wParam - VK_BROWSER_BACK + 1))));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HOOK_CallHooks( WH_KEYBOARD, remove ? HC_ACTION : HC_NOREMOVE,
|
if (HOOK_CallHooks( WH_KEYBOARD, remove ? HC_ACTION : HC_NOREMOVE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user