mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
27.75k stars 2.86k forks source link

--no-border option causes title to be duplicated in OSC #7508

Closed tonycpsu closed 4 years ago

tonycpsu commented 4 years ago

Important Information

Provide following Information:

Reproduction steps

See:

$ MPV_HOME=/tmp mpv --script-opts=osc-visibility=always ~/Movies/Juno\ Jupiter\ Flyby.mp4

image

vs.

$ MPV_HOME=/tmp mpv --no-border --script-opts=osc-visibility=always ~/Movies/Juno\ Jupiter\ Flyby.mp4

image

Expected behavior

Title only appears in OSC, or perhaps an option to have it appear in OSC or at the top.

Actual behavior

Title is duplicated, once at the top, once as part of the OSC bar.

Dudemanguy commented 4 years ago

Not really a bug. By default, the windowcontrols is activated if --no-border is given which displays the title at the top. If you want to disable it, you could use --script-opts=osc-windowcontrols=no. Of course, maybe this is an argument for it to be possible to show the windowcontrols but without the extra title at the top.

philipl commented 4 years ago

I thought about this when I wrote the code, but I decided not to - as it would require more special case code and it doesn't save any space. If you remove one of the names, you don't get any space back.

tonycpsu commented 4 years ago

--script-opts=osc-windowcontrols=no seems to interfere with --script-opts=osc-visibility=always. If I enable the former, I have to move the mouse to see the OSC, even though --script-opts=osc-visibility=always should keep it on at all times. So I don't think that's a good workaround in this case.

tonycpsu commented 4 years ago

doesn't save any space. you remove one of the names, you don't get any space back.

Sure, but you also don't have two titles covering portions of your video for no good reason.

Dudemanguy commented 4 years ago

--script-opts=osc-windowcontrols=no seems to interfere with --script-opts=osc-visibility=always

It should be okay if you use --script-opts=osc-windowcontrols=no,osc-visibility=always.

tonycpsu commented 4 years ago

That'll do.

Akemi commented 4 years ago

duplicate of #7481.

avih commented 4 years ago

To summarize:

tonycpsu commented 4 years ago

The OSC title area can be modified to not include a title, if you prefer using the title osc option. It defaults to ${media-title} and you can replace it with anything you want.

Thanks for this advice, and I'm totally with this ticket being closed now that I have a workaround, but just for the record, replacing the title option with an empty string doesn't work -- it just goes to the default. This might be a useful change for anyone who wants to keep window controls when border is disabled but doesn't want title duplicated.

garoto commented 4 years ago

The OSC title area can be modified to not include a title, if you prefer using the title osc option.

windowcontrols title logic is shared with whatever one have declared as title= in osc.conf.