1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 01:47:38 +00:00

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).
This commit is contained in:
Dudemanguy 2023-08-13 15:31:51 -05:00
parent 200992f90c
commit f7151932df

View File

@ -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