[Wine-patches] [eter-2.0.0] winex11.drv: Use XK_KP_Decimal as a fallback if XK_KP_Separator doesn't work. (eterbug #8370)
Dmitry Timoshkov
dmitry на baikal.ru
Чт Май 10 06:57:58 MSK 2012
This patch should fix the regression reported in the WineHQ bug 30568.
---
dlls/winex11.drv/keyboard.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 058e86f..0ddce55 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -2196,7 +2196,11 @@ UINT CDECL X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
* in order to produce a locale dependent numeric separator.
*/
if (wCode == VK_DECIMAL || wCode == VK_SEPARATOR)
- e.keycode = XKeysymToKeycode(e.display, XK_KP_Separator);
+ {
+ e.keycode = XKeysymToKeycode(e.display, XK_KP_Separator);
+ if (!e.keycode)
+ e.keycode = XKeysymToKeycode(e.display, XK_KP_Decimal);
+ }
if (!e.keycode)
{
@@ -2554,7 +2558,11 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
* in order to produce a locale dependent numeric separator.
*/
if (virtKey == VK_DECIMAL || virtKey == VK_SEPARATOR)
+ {
e.keycode = XKeysymToKeycode(e.display, XK_KP_Separator);
+ if (!e.keycode)
+ e.keycode = XKeysymToKeycode(e.display, XK_KP_Decimal);
+ }
if (!e.keycode && virtKey != VK_NONAME)
{
--
1.7.10.1
Подробная информация о списке рассылки Wine-patches