diff options
author | Dudemanguy <random342@airmail.cc> | 2023-11-06 11:22:04 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-11-06 23:13:31 +0000 |
commit | f4c5fa12cb7f7111cc733efddc3f0d780221923d (patch) | |
tree | d32c35a3ec966aafa6d90022da48761a6cfa20b6 /DOCS/man/options.rst | |
parent | 953176ee423445069bae49bf8e9bc36f4390de4c (diff) | |
download | mpv-f4c5fa12cb7f7111cc733efddc3f0d780221923d.tar.bz2 mpv-f4c5fa12cb7f7111cc733efddc3f0d780221923d.tar.xz |
wayland: improve wl_output guessing before mpv window is mapped
There's some geometry-related things that mpv has to calculate before
the window is actually mapped onto the screen in wayland. But there's no
way to know which output the window will end up on before it happens, so
it's possible to calculate it using the wrong values. mpv corrects
itself later when the surface event happens, but making the initial
guess work better can help in certain cases.
find_output is the only thing that needs to be changed here. Its main
purpose is to grab the right output based on user settings when we're
trying to full screen and giving a fallback in case we don't have
wl->current_output yet. The x11 code already does something similar, so
we're basically just copying it. Allow user settings like --screen and
--screen-name to influence the initial wl_output guess. Those options
won't actually place the window on that specific screen since we can't
do that in wayland, but if the user knows where the window will end up
beforehand it makes sense to listen to the arguments they pass. If
something goes wrong, then we just fallback to 0 like before.
Diffstat (limited to 'DOCS/man/options.rst')
-rw-r--r-- | DOCS/man/options.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index a4fb20f8a0..42399509ae 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3005,6 +3005,13 @@ Window explicitly. It's also possible that the window manager provides native features to control which screens application windows should use. + .. admonition:: Note (Wayland) + + This option does not actually work on wayland since window placement is + not allowed. However setting this option does influence mpv's initial + guess at finding an output which may be useful for options like + ``--geometry`` or ``--autofit`` which depend on the monitor resolution. + See also ``--fs-screen``. ``--screen-name=<string>`` |