From 68fa3c49db720645da2c653a8c8f9d92c0d6815f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 2 Feb 2013 14:20:24 +0100 Subject: cocoa_events: remove this functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This functionality looked smart but created problems with some kinds of multi touch events. Moreover some events coming from the windows server – like hovering a corner for window resize – didn't cause the player to wake up immediately. The "correct" non hacky way to implement async event polling with cocoa would be having the vanilla cocoa event loop driving the player and setting up mpv's terminal FDs as event sources for the cocoa event loop. Fixes #20 --- core/input/input.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'core/input/input.c') diff --git a/core/input/input.c b/core/input/input.c index 8b473dda43..e5af8e8d0c 100644 --- a/core/input/input.c +++ b/core/input/input.c @@ -61,10 +61,6 @@ #include "ar.h" -#ifdef CONFIG_COCOA -#include "osdep/cocoa_events.h" -#endif - #define MP_MAX_KEY_DOWN 32 struct cmd_bind { @@ -1505,11 +1501,7 @@ static void read_all_fd_events(struct input_ctx *ictx, int time) static void read_all_events(struct input_ctx *ictx, int time) { getch2_poll(); -#ifdef CONFIG_COCOA - cocoa_events_read_all_events(ictx, time); -#else read_all_fd_events(ictx, time); -#endif } int mp_input_queue_cmd(struct input_ctx *ictx, mp_cmd_t *cmd) @@ -1774,10 +1766,6 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf) parse_config(ictx, true, bstr0(builtin_input_conf), ""); -#ifdef CONFIG_COCOA - cocoa_events_init(ictx, read_all_fd_events); -#endif - #ifndef __MINGW32__ long ret = pipe(ictx->wakeup_pipe); for (int i = 0; i < 2 && ret >= 0; i++) { @@ -1890,10 +1878,6 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf) void mp_input_uninit(struct input_ctx *ictx) { -#ifdef CONFIG_COCOA - cocoa_events_uninit(); -#endif - if (!ictx) return; -- cgit v1.2.3