xf86-video-vesa/u_Restore-palette-on-LeaveVT.patch
Egbert Eich 84414b2924 - u_Restore-palette-on-LeaveVT.patch:
Restore the Palette on LeaveVT - as it is done on CloseScreen() already
  (bnc#719866).
- u_Enable-DefaultRefresh-by-default.patch:
  Update comments.

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xf86-video-vesa?expand=0&rev=15
2014-05-22 13:52:55 +00:00

36 lines
1.0 KiB
Diff

From: Egbert Eich <eich@freedesktop.org>
Date: Thu Sep 22 16:47:19 2011 +0200
Subject: [PATCH]Restore palette on LeaveVT()
Patch-mainline: to be upstreamed
Git-commit: 46bbbae9b7e714c472db4c36733096772a17d86f
Git-repo: ssh://git.freedesktop.org/git/xorg/driver/xf86-video-vesa
References: bnc#719866
Signed-off-by: Egbert Eich <eich@suse.com>
Use BIOS function to restore palette on LeaveVT().
This fixes messed up colors in text mode on VT switch.
It is already done in CloseScreen().
Signed-off-by: Egbert Eich <eich@freedesktop.org>
---
src/vesa.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/vesa.c b/src/vesa.c
index 53854b1..dc308f4 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -1127,7 +1127,12 @@ static void
VESALeaveVT(VT_FUNC_ARGS_DECL)
{
SCRN_INFO_PTR(arg);
+ VESAPtr pVesa = VESAGetRec(pScrn);
+
VESASaveRestore(pScrn, MODE_RESTORE);
+ if (pVesa->savedPal)
+ VBESetGetPaletteData(pVesa->pVbe, TRUE, 0, 256,
+ pVesa->savedPal, FALSE, TRUE);
}
static Bool