Commit 80db3ad8 authored by Kevin Koltzau's avatar Kevin Koltzau Committed by Alexandre Julliard

user32: Generate WM_APPCOMMAND messages for browser and multimedia keys.

parent 00ad155a
...@@ -711,6 +711,16 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa ...@@ -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;
......
...@@ -1637,20 +1637,28 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter, ...@@ -1637,20 +1637,28 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
if (remove) if (remove)
{ {
/* Handle F1 key by sending out WM_HELP message */ if((msg->message == WM_KEYDOWN) &&
if ((msg->message == WM_KEYUP) && (msg->hwnd != GetDesktopWindow()))
(msg->wParam == VK_F1) &&
(msg->hwnd != GetDesktopWindow()) &&
!MENU_IsMenuActive())
{ {
HELPINFO hi; /* Handle F1 key by sending out WM_HELP message */
hi.cbSize = sizeof(HELPINFO); if(msg->wParam == VK_F1 &&
hi.iContextType = HELPINFO_WINDOW; !MENU_IsMenuActive())
hi.iCtrlId = GetWindowLongPtrA( msg->hwnd, GWLP_ID ); {
hi.hItemHandle = msg->hwnd; HELPINFO hi;
hi.dwContextId = GetWindowContextHelpId( msg->hwnd ); hi.cbSize = sizeof(HELPINFO);
hi.MousePos = msg->pt; hi.iContextType = HELPINFO_WINDOW;
SendMessageW( msg->hwnd, WM_HELP, 0, (LPARAM)&hi ); hi.iCtrlId = GetWindowLongPtrA( msg->hwnd, GWLP_ID );
hi.hItemHandle = msg->hwnd;
hi.dwContextId = GetWindowContextHelpId( msg->hwnd );
hi.MousePos = msg->pt;
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))));
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment