summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2019-11-26 08:50:14 +0800
committerPhilip Langdale <github.philipl@overt.org>2019-11-29 16:56:20 +0800
commita220f086486563bf27110013fc3f2322bbb198c7 (patch)
tree44b0211f13718c7a274f1283a157115462beab7b /DOCS/man
parent901b3dddb0c03d20ec634197b17a9d6b15e8e641 (diff)
downloadmpv-a220f086486563bf27110013fc3f2322bbb198c7.tar.bz2
mpv-a220f086486563bf27110013fc3f2322bbb198c7.tar.xz
osc: implement pseudo client side decorations via OSC
Today, if window decorations are not present, either because they were disabled, or because the platform doesn't support them (eg: gnome-shell on wayland), there are no window controls, meaning it is not possible to minimize/maximize/close a window without knowing keyboard shortcuts. While you can imagine various ways of offering client side decorations, it is attractive to consider using OSC because that is functionality that we already have. The main work here is defining a separate input area from the main OSC box with its own buttons, etc. While we could probably handle auto-detection based on whether decorations are present or not, it's manually controlled for now. The window control logic is mostly disconnected from the OSC itself, except in the case of the `topbar` layout, where there has to be coordination so that the controls don't get drawn on top of each other. I had to do fine-positioning of the buttons based on the font on my system, so don't be surprised if it looks wrong elsewhere. You could also argue that window controls should be unscaled, even if the main OSC box is scaled, but I've not tried to do this.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/osc.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst
index d9c3b3fe96..c0b3760a2e 100644
--- a/DOCS/man/osc.rst
+++ b/DOCS/man/osc.rst
@@ -341,6 +341,22 @@ Configurable Options
``--sub-use-margins`` option is set to ``yes``, the default). This may be
fixed later.
+``windowcontrols``
+ Default: no (Do not show window controls)
+
+ Whether to show window management controls over the video, and if so,
+ which side of the window to place them. This may be desirable when the
+ window has no decorations, either because they have been explicitly
+ disabled (``border=no``) or because the current platform doesn't support
+ them (eg: gnome-shell with wayland).
+
+ The set of window controls is fixed, offering ``minimze``, ``maximize``,
+ and ``quit``. Not all platforms implement ``minimize`` and ``maximize``,
+ but ``quit`` will always work.
+
+ Supports ``left`` and ``right`` which will place the controls on those
+ respective sides.
+
Script Commands
~~~~~~~~~~~~~~~