From b23dce6d7cd66c11a770ce921659f7a19c804cf7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 24 Feb 2013 23:35:13 +0100 Subject: x11_common: always create a window, even with --wid The --wid switch (for embedding the player into other applications) didn't create a new window, and instead tried to use the window that was passed via --wid directly. This made the code more complex, caused strange X errors (mpv and host application fighting for exclusive X resources), and actually could cause issues if the --wid window wasn't created with the X Visual needed for OpenGL. Always create a window instead. This makes it always possible to embed the player into foreign windows. --geometry doesn't work anymore - the controlling application should always create a new window to place the player inside it, and can control the video window by moving and resizing this window. w32_common.c actually did this right, and always creates a new window. --- DOCS/man/en/options.rst | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'DOCS/man/en/options.rst') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 359a194480..2d685f0217 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -226,7 +226,7 @@ are applied after this option. See ``--geometry`` for details how this is handled with multi-monitor - setups, or if the ``--wid`` option is used. + setups. Use ``--autofit-larger`` instead if you don't want the window to get larger. Use ``--geometry`` if you want to force both window width and height to a @@ -737,11 +737,11 @@ lower border" and "--20+-10" means "place 20 pixels beyond the right and 10 pixels beyond the top border". - If an external window is specified using the ``--wid`` option, - then the x and y coordinates are relative to the top-left corner of the - window rather than the screen. The coordinates are relative to the screen - given with ``--screen`` for the video output drivers that fully - support ``--screen``. + If an external window is specified using the ``--wid`` option, this + option is ignored. + + The coordinates are relative to the screen given with ``--screen`` for the + video output drivers that fully support ``--screen``. *NOTE*: Generally only supported by GUI VOs. Ignored for encoding. @@ -2343,4 +2343,10 @@ --wid= (X11 and win32 only) - This tells mpv to attach to an existing window.See ``--slave-broken``. + This tells mpv to attach to an existing window. The ID is interpreted as + "Window" on X11, and as HWND on win32. If a VO is selected that supports + this option, a new window will be created and the given window will be set + as parent. The window will always be resized to cover the parent window + fully, and will add black bars to compensate for the video aspect ratio. + + See ``--slave-broken``. -- cgit v1.2.3