summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2014-11-08 21:43:14 +1100
committerwm4 <wm4@nowhere>2014-11-08 12:16:14 +0100
commit68ecbdf92049675997fe0c4f5de4ac7de9958840 (patch)
tree8545015d74edbbf782d415112456ea2eb8b26af5
parent249e8f6a54e154ac20c2f9ff0255b7b8bedae84e (diff)
downloadmpv-68ecbdf92049675997fe0c4f5de4ac7de9958840.tar.bz2
mpv-68ecbdf92049675997fe0c4f5de4ac7de9958840.tar.xz
w32_common: open window menu on Alt+Space
Since mpv doesn't call TranslateMessage, this must be done manually. Should fix #1254
-rw-r--r--video/out/w32_common.c10
1 files changed, 10 insertions, 0 deletions
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)