diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2023-11-27 01:16:54 -0500 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-12-06 11:07:37 +0100 |
commit | 79068baf43720028d239446a71d383a95e18a4ac (patch) | |
tree | 9d61818ed946a2f59cd17865f3efec77fc87fb5a /osdep/w32_keyboard.c | |
parent | 4c47dbe22c8afedbb3603e4acb23621277f5ef43 (diff) | |
download | mpv-79068baf43720028d239446a71d383a95e18a4ac.tar.bz2 mpv-79068baf43720028d239446a71d383a95e18a4ac.tar.xz |
win32: properly handle WM_XBUTTONUP and WM_XBUTTONDOWN
According to MS documentation, an application should return TRUE from
WM_XBUTTONUP and WM_XBUTTONDOWN if it processes these messages.
DefWindowProc generates the WM_APPCOMMAND message when it processes the
WM_XBUTTONUP message, so if an application properly handles WM_XBUTTONUP
messages, extra WM_APPCOMMAND messages won't be generated.
Because mpv doesn't properly handle these messages,
WM_XBUTTONUP causes APPCOMMAND_BROWSER_BACKWARD to be generated, resulting
in duplicated keys and improper fix 438ead7a, which prevents the processing
of the appcommand from sources other than mouse clicks.
Fix this by following the documentation, and the back and forward
appcommands can be added.
Diffstat (limited to 'osdep/w32_keyboard.c')
-rw-r--r-- | osdep/w32_keyboard.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep/w32_keyboard.c b/osdep/w32_keyboard.c index 52221e6565..57988ec0ec 100644 --- a/osdep/w32_keyboard.c +++ b/osdep/w32_keyboard.c @@ -93,6 +93,8 @@ static const struct keymap appcmd_map[] = { {APPCOMMAND_LAUNCH_MAIL, MP_KEY_MAIL}, {APPCOMMAND_BROWSER_FAVORITES, MP_KEY_FAVORITES}, {APPCOMMAND_BROWSER_SEARCH, MP_KEY_SEARCH}, + {APPCOMMAND_BROWSER_BACKWARD, MP_KEY_GO_BACK}, + {APPCOMMAND_BROWSER_FORWARD, MP_KEY_GO_FORWARD}, {0, 0} }; |