summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-11-07 18:36:26 -0600
committeravih <avih@users.noreply.github.com>2021-08-07 17:30:19 +0300
commita0441ddb5e1a494275dcb8235268cd113babc491 (patch)
tree3ecd9be906ef83a34f908302433ab89baf73b847 /DOCS
parent2667dd66437723580f80671933b55963cc6bc8f5 (diff)
downloadmpv-a0441ddb5e1a494275dcb8235268cd113babc491.tar.bz2
mpv-a0441ddb5e1a494275dcb8235268cd113babc491.tar.xz
command: make current-window-scale writeable, 2nd attempt
The window-scale property mirrors the respective option (not the effective scale derived from the current window size), and as such setting its value to the same value it had before has no effect. Specifically - the window will not resize. This is consistent as far as property-option bridge behavior goes, but we do end up with an issue that we can't set an arbitrary scale and expect the window to always resize accordingly. We do also have a current-window-scale property which does reflect the actual window size, however, it's been read-only till now. This commit makes current-window-scale RW so that it's now always possible to set an arbitrary scale and expect the window to resize accordingly (without affecting window-scale - like manual resize). Also, mention window-scale no-effect-if-not-changed at the docs. Based on code by @Dudemanguy from commit 873ae0d, with same effect.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/input.rst9
2 files changed, 9 insertions, 1 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index b4927470fa..ee84bc8f1c 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -42,6 +42,7 @@ Interface changes
instead be used to specifically set the contrast to any value.
- add a `--watch-later-options` option to allow configuring which
options quit-watch-later saves
+ - make `current-window-scale` writeable and use it in the default input.conf
--- mpv 0.33.0 ---
- add `--d3d11-exclusive-fs` flag to enable D3D11 exclusive fullscreen mode
when the player enters fullscreen.
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 75841dba99..3f59eb957b 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -2525,6 +2525,10 @@ Property list
(or to be exact, the size the video filters output). ``2`` will set the
double size, ``0.5`` halves the size.
+ Note that setting a value identical to its previous value will not resize
+ the window. That's because this property mirrors the ``window-scale``
+ option, and setting an option to its previous value is ignored.
+
See ``current-window-scale`` for the value derived from the actual window
size.
@@ -2533,12 +2537,15 @@ Property list
Before mpv 0.31.0, this returned what ``current-window-scale`` returns now,
after the window was created.
-``current-window-scale``
+``current-window-scale`` (RW)
The ``window-scale`` value calculated from the current window size. This
has the same value as ``window-scale`` if the window size was not changed
since setting the option, and the window size was not restricted in other
ways. The property is unavailable if no video is active.
+ Setting the value of this property will always resize the window
+ accordingly if possible, without affecting the value of ``window-scale``.
+
``focused``
Whether the window has focus. Might not be supported by all VOs.