From 3f7556baefec810b4bf4a4374b80ae58f53d06f6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Nov 2019 14:27:27 +0100 Subject: x11: implement unminimization This appears to work with IceWM. --- DOCS/man/options.rst | 2 +- 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) -- cgit v1.2.3