summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-09 18:28:37 +0200
committerwm4 <wm4@nowhere>2014-10-09 18:28:37 +0200
commite294656cb11082a77f2e785fb55ddafa926bbc47 (patch)
treece2c6c09aa15567b78ae9c311de81a90f15c3346
parentfef9ea5f6282b294cc1863dcc9e630e5ad9684ba (diff)
downloadmpv-e294656cb11082a77f2e785fb55ddafa926bbc47.tar.bz2
mpv-e294656cb11082a77f2e785fb55ddafa926bbc47.tar.xz
client API: rename --input-x11-keyboard to --input-vo-keyboard
Apparently we need this for Cocoa too. (The option was X11 specific in the hope that only X11 would need this hack.)
-rw-r--r--DOCS/client-api-changes.rst2
-rw-r--r--DOCS/client_api_examples/qtexample.cpp4
-rw-r--r--DOCS/man/options.rst7
-rw-r--r--input/input.c11
-rw-r--r--input/input.h2
-rw-r--r--player/client.c2
-rw-r--r--video/out/x11_common.c2
7 files changed, 18 insertions, 12 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index 8943855f13..c269ea1be0 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -33,6 +33,8 @@ API changes
work as expected, and now the behavior can be explicitly controlled
with the "input-x11-keyboard" option. This is only a temporary
measure until XEmbed is implemented and confirmed working.
+ Note: in 1.6, "input-x11-keyboard" was renamed to "input-vo-keyboard",
+ although the old option name still works.
1.4 - subtle change in X11 and "--wid" behavior
(this change was added to 0.5.2, and broke some things, see #1090)
--- mpv 0.5.0 is released ---
diff --git a/DOCS/client_api_examples/qtexample.cpp b/DOCS/client_api_examples/qtexample.cpp
index fa657cf7b9..b4b5934b57 100644
--- a/DOCS/client_api_examples/qtexample.cpp
+++ b/DOCS/client_api_examples/qtexample.cpp
@@ -67,8 +67,8 @@ MainWindow::MainWindow(QWidget *parent) :
mpv_set_option_string(mpv, "input-default-bindings", "yes");
// Enable keyboard input on the X11 window. For the messy details, see
- // --input-x11-keyboard on the manpage.
- mpv_set_option_string(mpv, "input-x11-keyboard", "yes");
+ // --input-vo-keyboard on the manpage.
+ mpv_set_option_string(mpv, "input-vo-keyboard", "yes");
// Let us receive property change events with MPV_EVENT_PROPERTY_CHANGE if
// this property changes.
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 86632436dd..f0bd8aac66 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -2176,8 +2176,9 @@ Input
Use the right Alt key as Alt Gr to produce special characters. If disabled,
count the right Alt as an Alt modifier key. Enabled by default.
-``--input-x11-keyboard=<yes|no>``
- Disable all keyboard input on the X11 VO window. Generally useful for
+``--input-vo-keyboard=<yes|no>``
+ Disable all keyboard input on for VOs which can't participate in proper
+ keyboard input dispatching. This currently affects X11. Generally useful for
embedding only.
On X11, a sub-window with input enabled grabs all keyboard input as long
@@ -2195,6 +2196,8 @@ Input
As a workaround, this option is disabled by default in libmpv. (Note that
``input-default-bindings`` is disabled by default in libmpv as well.)
+ (This option was renamed from ``--input-x11-keyboard``.)
+
OSD
---
diff --git a/input/input.c b/input/input.c
index dd3e0b33c4..35377251d1 100644
--- a/input/input.c
+++ b/input/input.c
@@ -175,7 +175,7 @@ struct input_opts {
int use_media_keys;
int default_bindings;
int enable_mouse_movements;
- int x11_key_input;
+ int vo_key_input;
int test;
};
@@ -196,7 +196,8 @@ const struct m_sub_options input_config = {
OPT_FLAG("right-alt-gr", use_alt_gr, CONF_GLOBAL),
OPT_INTRANGE("key-fifo-size", key_fifo_size, CONF_GLOBAL, 2, 65000),
OPT_FLAG("cursor", enable_mouse_movements, CONF_GLOBAL),
- OPT_FLAG("x11-keyboard", x11_key_input, CONF_GLOBAL),
+ OPT_FLAG("vo-keyboard", vo_key_input, CONF_GLOBAL),
+ OPT_FLAG("x11-keyboard", vo_key_input, CONF_GLOBAL), // old alias
#if HAVE_LIRC
OPT_STRING("lirc-conf", lirc_configfile, CONF_GLOBAL),
#endif
@@ -220,7 +221,7 @@ const struct m_sub_options input_config = {
.use_media_keys = 1,
#endif
.default_bindings = 1,
- .x11_key_input = 1,
+ .vo_key_input = 1,
},
};
@@ -709,10 +710,10 @@ bool mp_input_mouse_enabled(struct input_ctx *ictx)
return r;
}
-bool mp_input_x11_keyboard_enabled(struct input_ctx *ictx)
+bool mp_input_vo_keyboard_enabled(struct input_ctx *ictx)
{
input_lock(ictx);
- bool r = ictx->opts->x11_key_input;
+ bool r = ictx->opts->vo_key_input;
input_unlock(ictx);
return r;
}
diff --git a/input/input.h b/input/input.h
index 39489fff75..02257d9c85 100644
--- a/input/input.h
+++ b/input/input.h
@@ -156,7 +156,7 @@ void mp_input_get_mouse_pos(struct input_ctx *ictx, int *x, int *y);
// Return whether we want/accept mouse input.
bool mp_input_mouse_enabled(struct input_ctx *ictx);
-bool mp_input_x11_keyboard_enabled(struct input_ctx *ictx);
+bool mp_input_vo_keyboard_enabled(struct input_ctx *ictx);
/* Make mp_input_set_mouse_pos() mangle the mouse coordinates. Hack for certain
* VOs. dst=NULL, src=NULL reset it. src can be NULL.
diff --git a/player/client.c b/player/client.c
index f64f0bd976..23193a1391 100644
--- a/player/client.c
+++ b/player/client.c
@@ -403,7 +403,7 @@ mpv_handle *mpv_create(void)
mpv_set_option_string(ctx, "terminal", "no");
mpv_set_option_string(ctx, "osc", "no");
mpv_set_option_string(ctx, "input-default-bindings", "no");
- mpv_set_option_string(ctx, "input-x11-keyboard", "no");
+ mpv_set_option_string(ctx, "input-vo-keyboard", "no");
mpv_set_option_string(ctx, "input-lirc", "no");
} else {
mp_destroy(mpctx);
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 53b18ec5bb..79220d743f 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1265,7 +1265,7 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
LeaveWindowMask;
if (mp_input_mouse_enabled(vo->input_ctx))
events |= PointerMotionMask | ButtonPressMask | ButtonReleaseMask;
- if (mp_input_x11_keyboard_enabled(vo->input_ctx))
+ if (mp_input_vo_keyboard_enabled(vo->input_ctx))
events |= KeyPressMask | KeyReleaseMask;
vo_x11_selectinput_witherr(vo, x11->display, x11->window, events);
XMapWindow(x11->display, x11->window);