summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNicolas F <ovdev@fratti.ch>2019-12-22 01:19:53 +0100
committerwm4 <1387750+wm4@users.noreply.github.com>2019-12-22 02:33:48 +0100
commit93a6308bb762dc1c43e0301c7b6e977078bead9c (patch)
treef9c2d9323b58ae1dd842210a3b38827e5c68eafd /video/out
parente6bdd94cb2941b1c296d099672afc4e5d2ee0143 (diff)
downloadmpv-93a6308bb762dc1c43e0301c7b6e977078bead9c.tar.bz2
mpv-93a6308bb762dc1c43e0301c7b6e977078bead9c.tar.xz
video/out/x11: add fs-screen fallback
Apparently there are two different options for controlling which screen an mpv window goes onto: --fs-screen and --screen. The former explicitly only controls which screen a fullscreened window goes onto, but does not appear to actually care about this option at runtime for X11, so pressing f will always fullscreen to the screen mpv is currently on. This means the option is of questionable usefulness for starters. Making it worse, if you use --screen=1 --fs, mpv will actually fullscreen on screen 0, because --fs-screen isn't set. Instead of doing that, fall back to whatever --screen is set to.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/x11_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 8d03c43af3..d6ecf4969c 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -473,6 +473,9 @@ static void vo_x11_update_screeninfo(struct vo *vo)
XineramaScreenInfo *screens;
int num_screens;
+ if (opts->fullscreen && opts->fsscreen_id == -1)
+ screen = opts->screen_id;
+
screens = XineramaQueryScreens(x11->display, &num_screens);
if (screen >= num_screens)
screen = num_screens - 1;