summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/options.rst4
-rw-r--r--options/options.c1
-rw-r--r--options/options.h1
-rw-r--r--video/out/x11_common.c5
5 files changed, 10 insertions, 2 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 9e883800e8..f94ee4eb5e 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -39,6 +39,7 @@ Interface changes
- The remaining time printed in the terminal is now adjusted for speed by default.
You can disable this with `--no-term-remaining-playtime`.
- add `playlist-path` and `playlist/N/playlist-path` properties
+ - add `--x11-wid-title` option
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 8616dded9e..5ac17947c2 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -3437,6 +3437,10 @@ Window
mechanism in case there is good/bad behavior with whatever your combination
of hardware/drivers/etc. happens to be.
+``--x11-wid-title`` ``--no-x11-wid-title``
+ Whether or not to set the window title when mpv is embedded on X11 (default:
+ ``no``).
+
Disc Devices
------------
diff --git a/options/options.c b/options/options.c
index 027c93e904..7d00537b28 100644
--- a/options/options.c
+++ b/options/options.c
@@ -181,6 +181,7 @@ static const m_option_t mp_vo_opt_list[] = {
{"no", 0}, {"yes", 1}, {"fs-only", 2}, {"never", 3})},
{"x11-present", OPT_CHOICE(x11_present,
{"no", 0}, {"auto", 1}, {"yes", 2})},
+ {"x11-wid-title", OPT_BOOL(x11_wid_title)},
#endif
#if HAVE_WAYLAND
{"wayland-content-type", OPT_CHOICE(content_type, {"auto", -1}, {"none", 0},
diff --git a/options/options.h b/options/options.h
index d635901202..fac88dd939 100644
--- a/options/options.h
+++ b/options/options.h
@@ -32,6 +32,7 @@ typedef struct mp_vo_opts {
int x11_netwm;
int x11_bypass_compositor;
int x11_present;
+ bool x11_wid_title;
bool cursor_passthrough;
bool native_keyrepeat;
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 7289b51c2f..4010d2f5e5 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1575,10 +1575,11 @@ static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis,
if (!x11->parent) {
vo_x11_update_composition_hint(vo);
vo_x11_set_wm_icon(x11);
- vo_x11_update_window_title(vo);
vo_x11_dnd_init_window(vo);
vo_x11_set_property_utf8(vo, XA(x11, _GTK_THEME_VARIANT), "dark");
}
+ if (!x11->parent || x11->opts->x11_wid_title)
+ vo_x11_update_window_title(vo);
vo_x11_xembed_update(x11, 0);
}
@@ -2126,7 +2127,7 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
case VOCTRL_UPDATE_WINDOW_TITLE:
talloc_free(x11->window_title);
x11->window_title = talloc_strdup(x11, (char *)arg);
- if (!x11->parent)
+ if (!x11->parent || x11->opts->x11_wid_title)
vo_x11_update_window_title(vo);
return VO_TRUE;
case VOCTRL_GET_DISPLAY_FPS: {