public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Takuma Murakami <murakami@ipl.t.u-tokyo.ac.jp>
To: cygwin-xfree@cygwin.com
Subject: Re: Crashing after two or three server resets
Date: Sun, 11 Jan 2004 14:29:00 -0000	[thread overview]
Message-ID: <20040111232749.FFA7.MURAKAMI@ipl.t.u-tokyo.ac.jp> (raw)
In-Reply-To: <4000BF0E.2090102@msu.edu>

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

The crash in fontdir.c have been there for a while.  At least
most of xserv-2x releases have it.  I challenged the problem
several times but I could neither fix, nor unveil how to
reproduce it.  I think it occurred on the first reset as well
as plural resets.  But it's not certain because I have not yet
encountered it with xorg-based servers.

Another problem on server reset is that Japanese keyboard
layout is ignored after server reset in XDMCP sessions.
I attach a patch for the problem.  Now I'm missing where
the latest code resides, so I create it against xorg repository
on freedesktop.org.

Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)

[-- Attachment #2: xwin.jpkbd.patch --]
[-- Type: application/octet-stream, Size: 2381 bytes --]

Index: winconfig.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.c,v
retrieving revision 1.1.4.1.2.3
diff -u -r1.1.4.1.2.3 winconfig.c
--- winconfig.c	8 Jan 2004 05:10:32 -0000	1.1.4.1.2.3
+++ winconfig.c	11 Jan 2004 13:57:47 -0000
@@ -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;

  reply	other threads:[~2004-01-11 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-11  3:12 Harold L Hunt II
2004-01-11 14:29 ` Takuma Murakami [this message]
2004-01-11 17:17   ` Alexander Gottwald
2004-01-11 17:27     ` Thomas Dickey
2004-01-11 18:00       ` Alexander Gottwald
2004-01-11 17:50     ` Alexander Gottwald
2004-01-11 20:21   ` Harold L Hunt II
2004-01-12  0:00     ` Alexander Gottwald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040111232749.FFA7.MURAKAMI@ipl.t.u-tokyo.ac.jp \
    --to=murakami@ipl.t.u-tokyo.ac.jp \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).