[Xorg-commit] xc/programs/Xserver/hw/xwin winconfig.c,1.1.4.1.2.3,1.1.4.1.2.4
Alexander Gottwald
xorg-commit at pdx.freedesktop.org
Sun Jan 11 19:52:43 EET 2004
- Previous message: [Xorg-commit] xc/programs/Xserver/hw/xwin InitOutput.c,1.1.4.1.2.8,1.1.4.1.2.9 win.h,1.1.4.1.2.8,1.1.4.1.2.9 winclipboardthread.c,1.1.4.1.2.4,1.1.4.1.2.5 winclipboardxevents.c,1.1.4.1.2.7,1.1.4.1.2.8 winwndproc.c,1.1.4.1.2.6,1.1.4.1.2.7
- Next message: [Xorg-commit] xc/programs/Xserver/hw/xwin win.h,1.1.4.1.2.9,1.1.4.1.2.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: ago
Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv27647
Modified Files:
Tag: CYGWIN
winconfig.c
Log Message:
Fix Japanese keyboard not working after server reset. (Takuma Murakami)
Index: winconfig.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.c,v
retrieving revision 1.1.4.1.2.3
retrieving revision 1.1.4.1.2.4
diff -u -d -r1.1.4.1.2.3 -r1.1.4.1.2.4
--- winconfig.c 8 Jan 2004 05:10:32 -0000 1.1.4.1.2.3
+++ winconfig.c 11 Jan 2004 17:52:39 -0000 1.1.4.1.2.4
@@ -241,7 +241,7 @@
winConfigKeyboard (DeviceIntPtr pDevice)
{
char layoutName[KL_NAMELENGTH];
- unsigned int layoutNum;
+ static unsigned int layoutNum = 0;
int keyboardType;
XF86ConfInputPtr kbd = NULL;
XF86ConfInputPtr input_list = NULL;
@@ -295,14 +295,25 @@
if (keyboardType > 0 && GetKeyboardLayoutName (layoutName))
{
WinKBLayoutPtr pLayout;
-
- layoutNum = strtoul (layoutName, (char **)NULL, 16);
+
+ if (! layoutNum)
+ layoutNum = strtoul (layoutName, (char **)NULL, 16);
if ((layoutNum & 0xffff) == 0x411) {
/* The japanese layouts know a lot of different IMEs which all have
- different layout numbers set. Map them to a single entry.
- Same might apply for chinese, korean and other symbol languages
- too */
+ different layout numbers set. Map them to a single entry.
+ Same might apply for chinese, korean and other symbol languages
+ too */
layoutNum = (layoutNum & 0xffff);
+ if (keyboardType == 7)
+ {
+ /* Japanese layouts have problems with key event messages
+ such as the lack of WM_KEYUP for Caps Lock key.
+ Loading US layout fixes this problem. */
+ if (LoadKeyboardLayout("00000409", KLF_ACTIVATE) != NULL)
+ winMsg (X_INFO, "Loading US keyboard layout.\n");
+ else
+ winMsg (X_ERROR, "LoadKeyboardLaout failed.\n");
+ }
}
winMsg (X_PROBED, "winConfigKeyboard - Layout: \"%s\" (%08x) \n",
layoutName, layoutNum);
@@ -325,17 +336,6 @@
break;
}
- if ((layoutNum == 0x411) && keyboardType == 7)
- {
- /* Japanese layouts have problems with key event messages
- such as the lack of WM_KEYUP for Caps Lock key.
- Loading US layout fixes this problem. */
- if (LoadKeyboardLayout("00000409", KLF_ACTIVATE) != NULL)
- winMsg (X_INFO, "Loading US keyboard layout.\n");
- else
- winMsg (X_ERROR, "LoadKeyboardLaout failed.\n");
- }
-
}
g_winInfo.xkb.initialMap = NULL;
- Previous message: [Xorg-commit] xc/programs/Xserver/hw/xwin InitOutput.c,1.1.4.1.2.8,1.1.4.1.2.9 win.h,1.1.4.1.2.8,1.1.4.1.2.9 winclipboardthread.c,1.1.4.1.2.4,1.1.4.1.2.5 winclipboardxevents.c,1.1.4.1.2.7,1.1.4.1.2.8 winwndproc.c,1.1.4.1.2.6,1.1.4.1.2.7
- Next message: [Xorg-commit] xc/programs/Xserver/hw/xwin win.h,1.1.4.1.2.9,1.1.4.1.2.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the xorg-commit
mailing list