diff options
author | wm4 <wm4@nowhere> | 2019-11-29 14:27:27 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-29 14:27:27 +0100 |
commit | 3f7556baefec810b4bf4a4374b80ae58f53d06f6 (patch) | |
tree | 87d204a030d6c528e8620be6573733aaa354c306 | |
parent | 2b4c8675057cd43c21d4c124381bfb9c9930871c (diff) | |
download | mpv-3f7556baefec810b4bf4a4374b80ae58f53d06f6.tar.bz2 mpv-3f7556baefec810b4bf4a4374b80ae58f53d06f6.tar.xz |
x11: implement unminimization
This appears to work with IceWM.
-rw-r--r-- | DOCS/man/options.rst | 2 | ||||
-rw-r--r-- | video/out/x11_common.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 7c36cb657a..f31173a8ee 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2811,7 +2811,7 @@ Window Whether the video window is minimized or not. Setting this will minimize, or unminimze, the video window if the current VO supports it. Note that some VOs may support minimization while not supporting unminimization - (eg: X11 and Wayland). + (eg: Wayland). Whether this option and ``--window-maximized`` work on program start or at runtime, and whether they're (at runtime) updated to reflect the actual diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 39639db376..38fdca73df 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1836,8 +1836,12 @@ static void vo_x11_minimize(struct vo *vo) { struct vo_x11_state *x11 = vo->x11; - if (x11->opts->window_minimized) + if (x11->opts->window_minimized) { XIconifyWindow(x11->display, x11->window, x11->screen); + } else { + long params[5] = {0}; + x11_send_ewmh_msg(x11, "_NET_ACTIVE_WINDOW", params); + } } int vo_x11_control(struct vo *vo, int *events, int request, void *arg) |