summaryrefslogtreecommitdiffstats
path: root/sub/osd_libass.c
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2023-02-07 19:06:22 +0100
committersfan5 <sfan5@live.de>2023-02-11 14:51:14 +0100
commit8f76673608e1af606885399f97bcffbfc539d3e0 (patch)
tree8036c02ab6d8fdd6e22b9b451f95bbd27344b958 /sub/osd_libass.c
parent180b4faed0d7aed075c22cf3ac52cf9fc4a64860 (diff)
downloadmpv-8f76673608e1af606885399f97bcffbfc539d3e0.tar.bz2
mpv-8f76673608e1af606885399f97bcffbfc539d3e0.tar.xz
command: only avoid redrawing when old and new osd are both hidden
The `osd-overlay` command didn't trigger a redraw when the overlay was set to hidden. This is fine when the overlay was already hidden before that, but transitioning from not hidden to hidden requires a redraw.
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r--sub/osd_libass.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index 7bb0471610..e045bc6539 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -572,6 +572,11 @@ void osd_set_external(struct osd_state *osd, struct osd_external_ass *ov)
goto done;
}
+ if (!entry->ov.hidden || !ov->hidden) {
+ obj->changed = true;
+ osd->want_redraw_notification = true;
+ }
+
entry->ov.format = ov->format;
if (!entry->ov.data)
entry->ov.data = talloc_strdup(entry, "");
@@ -585,11 +590,6 @@ void osd_set_external(struct osd_state *osd, struct osd_external_ass *ov)
update_external(osd, obj, entry);
- if (!entry->ov.hidden) {
- obj->changed = true;
- osd->want_redraw_notification = true;
- }
-
if (zorder_changed) {
qsort(obj->externals, obj->num_externals, sizeof(obj->externals[0]),
cmp_zorder);