x11: fix screen-name option

9a7b2015e1 added the --screen-name option
for x11, but it was unfortunately broken. The commit does correctly
handle vo_x11_update_screeninfo and select the correct screen. However,
vo_x11_sizehint was missed. Specifically, the force_pos bool was always
false because it only took into account --screen being set and not
--screen-name. To fix this, just add an extra condition to the force_pos
bool so it becomes true if there's a string in --screen_name. Fixes
issue #9877.
This commit is contained in:
Dudemanguy 2022-04-07 21:23:19 -05:00
parent 3a934da1c7
commit 2cafe5137f
1 changed files with 1 additions and 0 deletions

View File

@ -1278,6 +1278,7 @@ static void vo_x11_sizehint(struct vo *vo, struct mp_rect rc, bool override_pos)
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
opts->screen_name || // also force onto screen area
x11->parent || // force to fill parent
override_pos; // for fullscreen and such