summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslatchurie <slatchurie@gmail.com>2018-10-14 02:37:55 +0200
committersfan5 <sfan5@live.de>2018-10-21 23:32:50 +0200
commit24e21a02365adff7c032cd7cb47e9c8b8f06bd93 (patch)
tree2af10d84319695bc8dce1191e45fa6efd02784c7
parent0f3e25cb0a65bf614440080d9880c8293761842f (diff)
downloadmpv-24e21a02365adff7c032cd7cb47e9c8b8f06bd93.tar.bz2
mpv-24e21a02365adff7c032cd7cb47e9c8b8f06bd93.tar.xz
x11: fix icc profile when the window goes near off screen
On a multi monitor setup, when the center of the window was going off screen, the icc profile would always switch to the profile of the first screen. This fixes the issue by defaulting the value to the current screen.
-rw-r--r--video/out/x11_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index e448c786ae..77ab6bbb45 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1642,7 +1642,7 @@ static int get_icc_screen(struct vo *vo)
struct vo_x11_state *x11 = vo->x11;
int cx = x11->winrc.x0 + (x11->winrc.x1 - x11->winrc.x0)/2,
cy = x11->winrc.y0 + (x11->winrc.y1 - x11->winrc.y0)/2;
- int screen = 0; // xinerama screen number
+ int screen = x11->current_icc_screen; // xinerama screen number
for (int n = 0; n < x11->num_displays; n++) {
struct xrandr_display *disp = &x11->displays[n];
if (mp_rect_contains(&disp->rc, cx, cy)) {