From ac227461aced6d721421e7b9229433cbf85c1162 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 7 Nov 2006 17:28:02 +0100 Subject: [PATCH] winex11.drv: Detect an XLookupString that returns Latin-1 and avoid codepage mapping in that case. --- dlls/winex11.drv/keyboard.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index fdbf526bbe0..7b31203df72 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -2512,6 +2512,13 @@ INT X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState, ret = 0; } + /* Hack to detect an XLookupString hard-coded to Latin1 */ + if (ret == 1 && keysym >= 0x00a0 && keysym <= 0x00ff && (BYTE)lpChar[0] == keysym) + { + bufW[0] = (BYTE)lpChar[0]; + goto found; + } + /* perform translation to unicode */ if(ret) {