the fullscreen style mask is not supported on macOS 11 anymore outside
of the native fullscreen animation. this can lead to a none working fs
or in the worst case a crash.
to fix this we will simulate a fullscreen window with a borderless
window with the size of the whole screen, though only on macOS 11.
Fixes#8490
when exiting fullscreen we set the window frame to a aspect fit frame of
the fullscreen frame to prevent aspect ration problems when animating.
though that intermediate frame was set too early and before the system
knew we already exited the fullscreen. because of that the frame we set
could not be properly set and its origin was defaulted to the bottom
left corner for exactly one display refresh and only after that the
wanted frame was set. this led to a (dark) grey area on the right or
top depending on the aspect ratio difference of the screen and video.
to prevent this set the intermediate frame in the animation group to
make it sync with the system's fullscreen behaviour.
Fixes#8371
remove the libmpv observer for the macOS specific options and use a
config cache + change callback for runtime changes. this is also a
preparation for new backends and generalises even more, since libmpv
functions can't and shouldn't be used in usual vo backends. for feature
parity the config cache is used.
move all backend independent code parts in their own folder and files,
to simplify adding new backends. the goal is to only extend one class
and add the backend dependent parts there. usually only the (un)init,
config and related parts need to be implemented per backend. furthermore
all needed windowing and related events are propagated and can be
overwritten. the other backend dependent part is usually the surface for
rendering, for example the opengl oder metal layer.
in the best case a new backend can be added with only a few hundred
lines.