diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-13 15:31:51 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-20 02:01:39 +0000 |
commit | f7151932df4b239a8ee724117103cc15635987c5 (patch) | |
tree | 8ff31562eeca6ca91327199dfda4a37e7a7a541e /video/out/x11_common.c | |
parent | 200992f90c49fdc2d5605cf79ffaa5247fd62e3e (diff) | |
download | mpv-f7151932df4b239a8ee724117103cc15635987c5.tar.bz2 mpv-f7151932df4b239a8ee724117103cc15635987c5.tar.xz |
x11: set sizehint for fs-screen and fs-screen-name
Without doing this, --fs --fs-screen=1 wouldn't actually end up on the
desired screen since the sizehint was never sent. Also check the
screen-name variants for an empty string as well so the option can
properly "undo" itself (not sure if this has any practical effect).
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index c4ceb53a89..f63e1f02cd 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1356,9 +1356,13 @@ static void vo_x11_sizehint(struct vo *vo, struct mp_rect rc, bool override_pos) if (!x11->window || x11->parent) return; + bool screen = opts->screen_id >= 0 || (opts->screen_name && + opts->screen_name[0]); + bool fsscreen = opts->fsscreen_id >= 0 || (opts->fsscreen_name && + opts->fsscreen_name[0]); bool force_pos = opts->geometry.xy_valid || // explicitly forced by user opts->force_window_position || // resize -> reset position - opts->screen_id >= 0 || // force onto screen area + screen || fsscreen || // force onto screen area opts->screen_name || // also force onto screen area x11->parent || // force to fill parent override_pos; // for fullscreen and such |