From 68ecbdf92049675997fe0c4f5de4ac7de9958840 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Sat, 8 Nov 2014 21:43:14 +1100 Subject: w32_common: open window menu on Alt+Space Since mpv doesn't call TranslateMessage, this must be done manually. Should fix #1254 --- video/out/w32_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 600aa26716..f2d02d2c84 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -595,6 +595,16 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, } break; case WM_SYSKEYDOWN: + // Open the window menu on Alt+Space. Normally DefWindowProc opens the + // window menu in response to WM_SYSCHAR, but since mpv translates its + // own keyboard input, WM_SYSCHAR isn't generated, so the window menu + // must be opened manually. + if (wParam == VK_SPACE) { + SendMessage(w32->window, WM_SYSCOMMAND, SC_KEYMENU, ' '); + return 0; + } + + // Handle all other WM_SYSKEYDOWN messages as WM_KEYDOWN case WM_KEYDOWN: handle_key_down(w32, wParam, HIWORD(lParam)); if (wParam == VK_F10) -- cgit v1.2.3