mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Weird window border on mac OS 10.14

Open AllMelody opened this issue 7 years ago • 3 comments

mpv version and platform

mpv d6d6da4 built on Sat Dec 15 20:00:52 EST 2018 macOS 10.14.2 (18C54)

Reproduction steps

Open mpv window on macOS 10.14

Expected behavior

Window has no border

Actual behavior

Window has small (1 point?) light gray border.

Screenshots:

screen shot 2018-12-15 at 20 56 22

Border visible against 100% black background. It cuts into the video area a little:

screen shot 2018-12-15 at 21 04 34

For reference, this is how mpv looks on a 100% black background on 10.13 and earlier:

screen shot 2018-12-15 at 20 54 46

AllMelody avatar Dec 16 '18 02:12 AllMelody

first of all, window decorations are inherently done by macOS. there is nothing we can do about, with some exceptions. this is a change done by Apple with the new(er) dark mode introduced in 10.14. quicktime for comparison behaves the same way. also according to an Apple appkit engineer, asked by @ePirat, there is no public API to change that behaviour. if you want a choice report it to Apple.

so lets see what we can do or theoretically could do:

  1. with PR #6277 there is at least a way to make the border darker with some combinations.
  2. we could use a borderless style mask. this removes the title bar completely, there will only be an inconsistent border shadow that never looks like the one on other windows, and it will possibly reintroduce some render glitches.
  3. 2 could be combined with completely drawing our own title bar and window decoration (shadow, rounded borders etc.), which will be huge bloody mess and i won't do it neither would i support something like this. this is only theoretically and i am not even sure if this will completely work.

to be a bit nitpicky. your expected behaviour should only hold true with the --no-border option. i was a bit lose with my interpretation and it still does use some window decoration with it, eg shadows and rounded borders. if wanted i could probably add an option for a no border styling, eg how it is currently and a 'real' no border window without rounded corners and a broken shadow.

Akemi avatar Dec 16 '18 11:12 Akemi

I noticed that --vo=gpu with --no-border helps. However, the warning suggests that --vo=libmpv is preferred on macOS.

ghost avatar Dec 18 '18 07:12 ghost

yes, that uses the no border window style. yes, --vo=gpu and the cocoa backend is basically not maintained and broken.

Akemi avatar Dec 18 '18 17:12 Akemi