summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-04-07 21:23:19 -0500
committerDudemanguy <random342@airmail.cc>2022-04-08 19:34:53 +0000
commit2cafe5137f1544df130face8f748cc571ddf0445 (patch)
tree93f3ec8bef9e5c8fd104429d59cba5589912134d /video/out
parent3a934da1c7c86b9f40d052d0303048aeeffcc5c4 (diff)
downloadmpv-2cafe5137f1544df130face8f748cc571ddf0445.tar.bz2
mpv-2cafe5137f1544df130face8f748cc571ddf0445.tar.xz
x11: fix screen-name option
9a7b2015e1a711a57b6e660774c36956ac59a7f6 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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/x11_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index c3fa16f2a9..d1fb3b6f0a 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -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