summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-11-15 11:25:12 +1000
committerJeremy Huddleston <jeremyhu@apple.com>2010-12-02 12:17:00 -0800
commit602ad9868421f6abb9cc13ed43699e43e2f3e02c (patch)
tree640ad38d3a76b707992112e6e7b26ad335c46704
parent2b7588a78f0268928218c530af329509f308b30d (diff)
xfree86: apply gamma settings on EnterVT.
When entering the VT, re-apply the saved gamma settings for each screen. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit c050aa2f5fa6a7ff8ce4f91def14ca44f799f067)
-rw-r--r--hw/xfree86/modes/xf86RandR12.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index c17b5fa95..040c03659 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1776,6 +1776,7 @@ xf86RandR12EnterVT (int screen_index, int flags)
ScreenPtr pScreen = screenInfo.screens[screen_index];
ScrnInfoPtr pScrn = xf86Screens[screen_index];
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ rrScrPrivPtr rp = rrGetScrPriv(pScreen);
Bool ret;
if (randrp->orig_EnterVT) {
@@ -1787,6 +1788,11 @@ xf86RandR12EnterVT (int screen_index, int flags)
return FALSE;
}
+ /* reload gamma */
+ int i;
+ for (i = 0; i < rp->numCrtcs; i++)
+ xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]);
+
return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
}