summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-09 21:11:53 -0500
committerDudemanguy <random342@airmail.cc>2023-08-13 19:58:20 +0000
commit4a6abff812aec8666ede396072798130b2683c9f (patch)
tree85eb1de671dfebe1d81ee6fb4691c75877742298 /video
parente8a77e5279c2682a1554ba8fd47b99c6bf6f4d52 (diff)
downloadmpv-4a6abff812aec8666ede396072798130b2683c9f.tar.bz2
mpv-4a6abff812aec8666ede396072798130b2683c9f.tar.xz
x11: add --x11-wid-title option
This deliberately wasn't being done when mpv was embedded (fbccddb48b4c71c18300b092ef7a3860be2a659a). There are some applications that would benefit from mpv setting a title since they don't do so themselves (such as tabbed), but at the same time some others would probably rather not have this behavior (like smplayer). Add an option that allows an embedded mpv to set the title if the user wishes. Fixes #11528.
Diffstat (limited to 'video')
-rw-r--r--video/out/x11_common.c5
1 files changed, 3 insertions, 2 deletions
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: {