From 77dee9be2fa2fe4a2f45345b9902a4cd0b7fbdb5 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Thu, 31 Jul 2025 01:40:18 -0400 Subject: [PATCH] DOCS/man/options: add usage note for --wid=0 for win32 --- DOCS/man/options.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 6c9cd315c1..3db88416c1 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3738,13 +3738,25 @@ Window On win32, the ID is interpreted as ``HWND``. Pass it as value cast to ``uint32_t`` (all Windows handles are 32-bit), this is important as mpv will not accept negative values. mpv will create its own window and set the - wid window as parent, like with X11. + wid window as parent, like with X11. The value ``0`` is interpreted + specially, and mpv will draw on top of the desktop wallpaper and below + desktop icons. On Android, the ID is interpreted as ``android.view.Surface``. Pass it as a value cast to ``intptr_t``. Use with ``--vo=mediacodec_embed`` and ``--hwdec=mediacodec`` for direct rendering using MediaCodec, or with ``--vo=gpu --gpu-context=android`` (with or without ``--hwdec=mediacodec``). + .. note:: + + On win32, if desktop wallpaper transition occurs (e.g. setting desktop + slideshow of multiple images in Windows settings) and an ID value ``0`` + is used, Windows may sometimes destroy the window mpv is attached to. + mpv will simply treat this as a quit signal in this case. + + To prevent this from happening, set a static desktop wallpaper, + such as single image or pure color. + ``--window-dragging=`` Move the window when clicking on it and moving the mouse pointer (default: yes).