summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-26 02:18:47 +0100
committerwm4 <wm4@nowhere>2015-01-26 02:18:47 +0100
commitdf3e6b549c568e4b9d7981c9e4eedba9689c2e05 (patch)
treee7aacd9e1bca2430b58c0afaf47484e768bdc109 /video/out/x11_common.h
parent73d5e396fee7de11c525495d066f40d28e3c242b (diff)
downloadmpv-df3e6b549c568e4b9d7981c9e4eedba9689c2e05.tar.bz2
mpv-df3e6b549c568e4b9d7981c9e4eedba9689c2e05.tar.xz
vo_opengl, x11: implement icc-profile-auto
This queries the _ICC_PROFILE property on the root window. It also tries to reload the ICC when it changes, or if the mpv window changes the monitor. (If multiple monitors are covered, mpv will randomly select one of them.) The official spec is a dead link on freedesktop.org, so don't blame me for any bugs. Note that this assumes that Xinerama screen numbers match the way mpv enumerates the xrandr monitors. Although there is some chance that this matches, it most likely doesn't, and we actually have to do complicated things to map the screen numbers. If it turns out that this is required, I will fix it as soon as someone with a suitable setup for testing the fix reports it.
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index ba52bb92aa..095872cf78 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -35,6 +35,7 @@ struct xrandr_display {
struct mp_rect rc;
double fps;
char *name;
+ bool overlaps;
};
struct vo_x11_state {
@@ -110,6 +111,8 @@ struct vo_x11_state {
/* dragging the window */
bool win_drag_button1_down;
+
+ Atom icc_profile_property;
};
int vo_x11_init(struct vo *vo);