diff options
author | Akemi <der.richter@gmx.de> | 2017-03-26 20:32:04 +0200 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-03-26 20:38:26 +0200 |
commit | 063ca8f0fe48c281944c5307b1e8bbb11bb22822 (patch) | |
tree | 210cdaf74546f6578fbcedd47610f31773fe685a /input | |
parent | f8a223b7aca08491e22438df0f1ea233d602907c (diff) | |
download | mpv-063ca8f0fe48c281944c5307b1e8bbb11bb22822.tar.bz2 mpv-063ca8f0fe48c281944c5307b1e8bbb11bb22822.tar.xz |
osx: fix key input in certain circumstances
for a reason i can just assume some key events can vanish from the
event chain and mpv seems unresponsive.
after quite some testing i could confirm that the events are present at
the first entry point of the event chain, the sendEvent method of the
Application, and that they vanish at a point afterwards. now we use
that entry point to grab keyDown and keyUp events. we also stop
propagating those key events to prevent the no key input' error sound.
if we ever need the key events somewhere down the event chain we need
to start propagating them again. though this is not necessary currently.
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/input/input.c b/input/input.c index f0f9f64e9b..b8cc142da2 100644 --- a/input/input.c +++ b/input/input.c @@ -168,7 +168,6 @@ struct input_opts { int use_alt_gr; int use_appleremote; int use_media_keys; - int use_app_events; int default_bindings; int enable_mouse_movements; int vo_key_input; @@ -193,7 +192,6 @@ const struct m_sub_options input_config = { #if HAVE_COCOA OPT_FLAG("input-appleremote", use_appleremote, 0), OPT_FLAG("input-media-keys", use_media_keys, 0), - OPT_FLAG("input-app-events", use_app_events, M_OPT_FIXED), #endif OPT_FLAG("window-dragging", allow_win_drag, 0), OPT_REPLACED("input-x11-keyboard", "input-vo-keyboard"), @@ -210,7 +208,6 @@ const struct m_sub_options input_config = { #if HAVE_COCOA .use_appleremote = 1, .use_media_keys = 1, - .use_app_events = 1, #endif .default_bindings = 1, .vo_key_input = 1, @@ -1298,11 +1295,6 @@ void mp_input_load_config(struct input_ctx *ictx) talloc_free(tmp); } -#if HAVE_COCOA - if (ictx->opts->use_app_events) - cocoa_start_event_monitor(); -#endif - #if defined(__MINGW32__) if (ictx->global->opts->input_file && *ictx->global->opts->input_file) mp_input_pipe_add(ictx, ictx->global->opts->input_file); |