From 063ca8f0fe48c281944c5307b1e8bbb11bb22822 Mon Sep 17 00:00:00 2001 From: Akemi Date: Sun, 26 Mar 2017 20:32:04 +0200 Subject: 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. --- input/input.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'input') 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); -- cgit v1.2.3