summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 21:23:54 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 22:14:41 +0200
commitdba2b90d9a34055e98c9216bd305a5cb4fb01a3a (patch)
treeda5d649961ccc1ad9d3b812da24678b5433970a8 /input
parent58f62891fa99c8d4d0ebfc9c719134af753366e2 (diff)
downloadmpv-dba2b90d9a34055e98c9216bd305a5cb4fb01a3a.tar.bz2
mpv-dba2b90d9a34055e98c9216bd305a5cb4fb01a3a.tar.xz
libmpv/cocoa: don't start the event monitor
The event monitor is used to get keyboard events when there is no window, but since it is a global monitor to the current process, we don't want it in a library setting.
Diffstat (limited to 'input')
-rw-r--r--input/input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c
index 35377251d1..439a0cf4fa 100644
--- a/input/input.c
+++ b/input/input.c
@@ -173,6 +173,7 @@ 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;
@@ -204,6 +205,7 @@ const struct m_sub_options input_config = {
#if HAVE_COCOA
OPT_FLAG("appleremote", use_appleremote, CONF_GLOBAL),
OPT_FLAG("media-keys", use_media_keys, CONF_GLOBAL),
+ OPT_FLAG("app-events", use_app_events, CONF_GLOBAL),
#endif
{0}
},
@@ -219,6 +221,7 @@ 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,
@@ -1276,6 +1279,10 @@ void mp_input_load(struct input_ctx *ictx)
}
#if HAVE_COCOA
+ if (input_conf->use_app_events) {
+ cocoa_start_event_monitor();
+ }
+
if (input_conf->use_appleremote) {
cocoa_init_apple_remote();
ictx->using_ar = true;