xserver: Branch 'master' - 8 commits

Keith Packard keithp at kemper.freedesktop.org
Fri Feb 18 11:59:36 PST 2011


 hw/xwin/winclipboardxevents.c |    3 +
 hw/xwin/winconfig.c           |   77 ++++++++++++++++++++++++------------------
 hw/xwin/winkeybd.c            |    8 ++--
 hw/xwin/winkeybd.h            |   16 ++++----
 hw/xwin/winkeyhook.c          |    4 --
 hw/xwin/winkeynames.h         |   13 ++++---
 hw/xwin/winlayouts.h          |    8 ++--
 7 files changed, 74 insertions(+), 55 deletions(-)

New commits:
commit d1123b66ebbcf96dd816236f54befc568a5f7c68
Merge: 5d020c3... f6e4ace...
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Feb 18 11:59:25 2011 -0800

    Merge remote branch 'jturney/master'

commit f6e4ace9eabea1bb2a06dd86b6ffb954917a74ce
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Sun Jul 18 13:24:48 2010 +0100

    Cygwin/X: Fix for Canadian Multilingual Standard keyboard layout handling
    
    Add a keycode mapping for VK_OEM_8 as RCtrl, which is issued by Canadian
    Multilingual Standard layout
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winkeybd.h b/hw/xwin/winkeybd.h
index 662392b..4e4c35c 100644
--- a/hw/xwin/winkeybd.h
+++ b/hw/xwin/winkeybd.h
@@ -266,7 +266,7 @@ g_iKeyMap [] = {
   /* 220 */	0,		0,		0,
   /* 221 */	0,		0,		0,
   /* 222 */	0,		0,		0,
-  /* 223 */	0,		0,		0,
+  /* 223 */	VK_OEM_8,	0,		KEY_RCtrl,  /* at least on Candian Multilingual Standard layout */
   /* 224 */	0,		0,		0,
   /* 225 */	0,		0,		0,
   /* 226 */	0,		0,		0,
commit b421f5e5122dbe125a5629969cc657bd966b4261
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Thu Apr 1 23:10:58 2010 +0100

    Cygwin/X: Ignore MappingNotify events sent to clipboard integration client
    
    Ignore MappingNotify events sent to clipboard integration client,
    xmodmap changes aren't of interest to it, but there is no mechanism
    to express that disinterest.
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index 2f042fd..8b502b1 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -789,6 +789,9 @@ winClipboardFlushXEvents (HWND hwnd,
 	case PropertyNotify:
 	  break;
 
+	case MappingNotify:
+	  break;
+
 	default:
           ErrorF ("winClipboardFlushXEvents - unexpected event type %d\n", event.type);
 	  break;
commit e930aa7bbc7f04a128df8e6fd441aed5123a2eb6
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Tue Sep 14 16:02:53 2010 +0100

    Cygwin/X: Add Turkish keyboard layouts to keyboard layout mapping table
    
    0x0000041f "Turkish Q" => layout tr
    0x0001041f "Turkish F" => layout tr variant f
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h
index 288af19..ce502a0 100644
--- a/hw/xwin/winlayouts.h
+++ b/hw/xwin/winlayouts.h
@@ -81,6 +81,8 @@ WinKBLayoutRec winKBLayouts[] =
     {  0x00000816, -1, "pc105",     "pt",        NULL,        NULL, "Portuguese (Portugal)"},
     {  0x0000041a, -1, "pc105",     "hr",        NULL,        NULL, "Croatian"},
     {  0x0000041d, -1, "pc105",     "se",        NULL,        NULL, "Swedish (Sweden)"},
+    {  0x0000041f, -1, "pc105",     "tr",        NULL,        NULL, "Turkish (Q)"},
+    {  0x0001041f, -1, "pc105",     "tr",        "f",         NULL, "Turkish (F)"},
     {  0x00000424, -1, "pc105",     "si",        NULL,        NULL, "Slovenian"},
     {  0x00000425, -1, "pc105",     "ee",        NULL,        NULL, "Estonian"},
     {  0x00000452, -1, "pc105",     "gb",        "intl",      NULL, "United Kingdom (Extended)"},
commit ae99a6f895a3a5b6f71e2dd4874cd4bb0235aff0
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Sun Jul 18 13:42:29 2010 +0100

    Cygwin/X: Make the keyboard layout detection logging a bit clearer
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index 758c54d..76bf8e2 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -240,6 +240,7 @@ Bool
 winConfigKeyboard (DeviceIntPtr pDevice)
 {
   char                          layoutName[KL_NAMELENGTH];
+  unsigned char                 layoutFriendlyName[256];
   static unsigned int           layoutNum = 0;
   int                           keyboardType;
 #ifdef XWIN_XF86CONFIG
@@ -299,11 +300,32 @@ winConfigKeyboard (DeviceIntPtr pDevice)
 	    if (LoadKeyboardLayout("00000409", KLF_ACTIVATE) != NULL)
 	      winMsg (X_INFO, "Loading US keyboard layout.\n");
 	    else
-	      winMsg (X_ERROR, "LoadKeyboardLaout failed.\n");
+	      winMsg (X_ERROR, "LoadKeyboardLayout failed.\n");
 	  }
     }
-    winMsg (X_PROBED, "winConfigKeyboard - Layout: \"%s\" (%08x) \n", 
-            layoutName, layoutNum);
+
+    /* Discover the friendly name of the current layout */
+    {
+      HKEY                regkey = NULL;
+      const char          regtempl[] = "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\";
+      char                *regpath;
+      DWORD               namesize = sizeof(layoutFriendlyName);
+
+      regpath = malloc(sizeof(regtempl) + KL_NAMELENGTH + 1);
+      strcpy(regpath, regtempl);
+      strcat(regpath, layoutName);
+
+      if (!RegOpenKey(HKEY_LOCAL_MACHINE, regpath, &regkey))
+          RegQueryValueEx(regkey, "Layout Text", 0, NULL, layoutFriendlyName, &namesize);
+
+      /* Close registry key */
+      if (regkey)
+        RegCloseKey (regkey);
+      free(regpath);
+    }
+
+    winMsg (X_PROBED, "Windows keyboard layout: \"%s\" (%08x) \"%s\", type %d\n",
+            layoutName, layoutNum, layoutFriendlyName, keyboardType);
 
     for (pLayout = winKBLayouts; pLayout->winlayout != -1; pLayout++)
       {
@@ -311,46 +333,35 @@ winConfigKeyboard (DeviceIntPtr pDevice)
 	  continue;
 	if (pLayout->winkbtype > 0 && pLayout->winkbtype != keyboardType)
 	  continue;
-	
+
         bfound = TRUE;
 	winMsg (X_PROBED,
-		"Using preset keyboard for \"%s\" (%x), type \"%d\"\n",
-		pLayout->layoutname, pLayout->winlayout, keyboardType);
-	
+		"Found matching XKB configuration \"%s\"\n",
+		pLayout->layoutname);
+
+        winMsg(X_PROBED,
+               "Model = \"%s\" Layout = \"%s\""
+               " Variant = \"%s\" Options = \"%s\"\n",
+               pLayout->xkbmodel ? pLayout->xkbmodel : "none",
+               pLayout->xkblayout ? pLayout->xkblayout : "none",
+               pLayout->xkbvariant ? pLayout->xkbvariant : "none",
+               pLayout->xkboptions ? pLayout->xkboptions : "none");
+
 	g_winInfo.xkb.model = pLayout->xkbmodel;
 	g_winInfo.xkb.layout = pLayout->xkblayout;
 	g_winInfo.xkb.variant = pLayout->xkbvariant;
-	g_winInfo.xkb.options = pLayout->xkboptions; 
+	g_winInfo.xkb.options = pLayout->xkboptions;
+
+
 	break;
       }
-    
+
     if (!bfound)
       {
-        HKEY                regkey = NULL;
-        const char          regtempl[] = 
-          "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\";
-        char                *regpath;
-        unsigned char       lname[256];
-        DWORD               namesize = sizeof(lname);
-
-        regpath = malloc(sizeof(regtempl) + KL_NAMELENGTH + 1);
-        strcpy(regpath, regtempl);
-        strcat(regpath, layoutName);
-
-        if (!RegOpenKey(HKEY_LOCAL_MACHINE, regpath, &regkey) &&
-          !RegQueryValueEx(regkey, "Layout Text", 0, NULL, lname, &namesize))
-          {
-	    winMsg (X_ERROR,
-		"Keyboardlayout \"%s\" (%s) is unknown\n", lname, layoutName);
-          }
-
-	/* Close registry key */
-	if (regkey)
-	  RegCloseKey (regkey);
-        free(regpath);
+        winMsg (X_ERROR, "Keyboardlayout \"%s\" (%s) is unknown, using X server default layout\n", layoutFriendlyName, layoutName);
       }
-  }  
-  
+  }
+
   /* parse the configuration */
 #ifdef XWIN_XF86CONFIG
   if (g_cmdline.keyboard)
commit 57ca09441ee5ff2a8deb95eaa17a2625a756d912
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Thu Jul 1 14:54:48 2010 +0100

    Cygwin/X: Update mapping for Canadian keyboard layouts
    
    0x00000c0c "Canadian French (legacy)" => layout ca variant fr-legacy
    0x00001009 "Canadian French" => layout ca variant fr
    0x00011009 "Canadian Multilingual Standard" => layout ca variant multix
    
    Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h
index 9500689..288af19 100644
--- a/hw/xwin/winlayouts.h
+++ b/hw/xwin/winlayouts.h
@@ -55,13 +55,15 @@ WinKBLayoutRec winKBLayouts[] =
     {  0x00010409, -1, "pc105",     "dvorak",    NULL,        NULL, "English (USA,Dvorak)"},
     {  0x00020409, -1, "pc105",     "us_intl",   NULL,        NULL, "English (USA,International)"},
     {  0x00000809, -1, "pc105",     "gb",        NULL,        NULL, "English (United Kingdom)"},
+    {  0x00001009, -1, "pc105",     "ca",        "fr",        NULL, "French (Canada)"},
+    {  0x00011009, -1, "pc105",     "ca",        "multix",    NULL, "Canadian Multilingual Standard"},
     {  0x00001809, -1, "pc105",     "ie",        NULL,        NULL, "Irish"},
     {  0x0000040a, -1, "pc105",     "es",        NULL,        NULL, "Spanish (Spain,Traditional Sort)"},
     {  0x0000080a, -1, "pc105",     "latam",     NULL,        NULL, "Latin American"},
     {  0x0000040b, -1, "pc105",     "fi",        NULL,        NULL, "Finnish"},
     {  0x0000040c, -1, "pc105",     "fr",        NULL,        NULL, "French (Standard)"},
     {  0x0000080c, -1, "pc105",     "be",        NULL,        NULL, "French (Belgian)"},
-    {  0x00000c0c, -1, "pc105",     "ca",        "fr",        NULL, "French (Canada)"},
+    {  0x00000c0c, -1, "pc105",     "ca",        "fr-legacy", NULL, "French (Canada, Legacy)"},
     {  0x0000100c, -1, "pc105",     "ch",        "fr",        NULL, "French (Switzerland)"},
     {  0x0000040d, -1, "pc105",     "il",        NULL,        NULL, "Hebrew"},
     {  0x0000040e, -1, "pc105",     "hu",        NULL,        NULL, "Hungarian"},
@@ -89,5 +91,3 @@ WinKBLayoutRec winKBLayouts[] =
   See http://technet.microsoft.com/en-us/library/cc766503%28WS.10%29.aspx
   for a listing of input locale (keyboard layout) codes
 */
-
-
commit be3e5bb50178406e46368be00860331e1b6c4093
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Wed Apr 14 21:45:29 2010 +0100

    Cygwin/X: Better keycode debugging output
    
    Replace useless #if 0/ErrorF/#endif with winDebug
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 83fea21..9e5a9b0 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -73,6 +73,8 @@ winTranslateKey (WPARAM wParam, LPARAM lParam, int *piScanCode)
   int		iParam = HIWORD (lParam);
   int		iParamScanCode = LOBYTE (iParam);
 
+  winDebug("winTranslateKey: wParam %08x lParam %08x\n", wParam, lParam);
+
 /* WM_ key messages faked by Vista speech recognition (WSR) don't have a
  * scan code.
  *
@@ -488,10 +490,8 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
   for (i = 0; i < nevents; i++)
     mieqEnqueue(g_pwinKeyboard, (InternalEvent*)events[i].event);
 
-#if CYGDEBUG
-  ErrorF("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
-          dwKey, fDown, nevents);
-#endif
+  winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
+           dwKey, fDown, nevents);
 }
 
 BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
diff --git a/hw/xwin/winkeyhook.c b/hw/xwin/winkeyhook.c
index fe1156d..cbee7cb 100644
--- a/hw/xwin/winkeyhook.c
+++ b/hw/xwin/winkeyhook.c
@@ -88,9 +88,7 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam)
   /* Pass keystrokes on to our main message loop */
   if (iCode == HC_ACTION)
     {
-#if 0
-      ErrorF ("vkCode: %08x\tscanCode: %08x\n", p->vkCode, p->scanCode);
-#endif
+      winDebug("winKeyboardMessageHook: vkCode: %08x scanCode: %08x\n", p->vkCode, p->scanCode);
 
       switch (wParam)
 	{
commit 81892bf6b7e3730ebd19318183734f55dbaa5d4b
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Wed Apr 14 21:34:39 2010 +0100

    Cygwin/X: Generate X keycodes for multimedia keys
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winkeybd.h b/hw/xwin/winkeybd.h
index 5b2a589..662392b 100644
--- a/hw/xwin/winkeybd.h
+++ b/hw/xwin/winkeybd.h
@@ -216,13 +216,13 @@ g_iKeyMap [] = {
   /* 170 */	0,		0,		0,
   /* 171 */	0,		0,		0,
   /* 172 */	0,		0,		0,
-  /* 173 */	0,		0,		0,
-  /* 174 */	0,		0,		0,
-  /* 175 */	0,		0,		0,
-  /* 176 */	0,		0,		0,
-  /* 177 */	0,		0,		0,
-  /* 178 */	0,		0,		0,
-  /* 179 */	0,		0,		0,
+  /* 173 */	VK_VOLUME_MUTE,	0,		KEY_Mute,
+  /* 174 */	VK_VOLUME_DOWN,	0,		KEY_AudioLower,
+  /* 175 */	VK_VOLUME_UP,	0,		KEY_AudioRaise,
+  /* 176 */	VK_MEDIA_NEXT_TRACK,	0,	KEY_NEXTSONG,
+  /* 177 */	VK_MEDIA_PREV_TRACK,	0,	KEY_PREVIOUSSONG,
+  /* 178 */	VK_MEDIA_STOP,	0,		KEY_STOPCD,
+  /* 179 */	VK_MEDIA_PLAY_PAUSE,	0,	KEY_PLAYPAUSE,
   /* 180 */	0,		0,		0,
   /* 181 */	0,		0,		0,
   /* 182 */	0,		0,		0,
diff --git a/hw/xwin/winkeynames.h b/hw/xwin/winkeynames.h
index 3d59383..914016a 100644
--- a/hw/xwin/winkeynames.h
+++ b/hw/xwin/winkeynames.h
@@ -23,10 +23,6 @@
  *
  */
 
-#define XK_TECHNICAL
-#define	XK_KATAKANA
-#include <X11/keysym.h>
-
 #define GLYPHS_PER_KEY	4
 #define NUM_KEYCODES	248
 #define MIN_KEYCODE     8
@@ -194,6 +190,15 @@
 #define KEY_HKTG         /* Hirugana/Katakana tog 0xc8  */  200
 #define KEY_BSlash2      /* \           _         0xcb  */  203
 
+#define KEY_Mute         /* Audio Mute                  */  152
+#define KEY_AudioLower   /* Audio Lower                 */  168
+#define KEY_AudioRaise   /* Audio Raise                 */  166
+
+#define KEY_NEXTSONG     /* Media next                  */  145
+#define KEY_PLAYPAUSE    /* Media play/pause toggle     */  154
+#define KEY_PREVIOUSSONG /* Media previous              */  136
+#define KEY_STOPCD       /* Media stop                  */  156
+
 /* These are for "notused" and "unknown" entries in translation maps. */
 #define KEY_NOTUSED	  0
 #define KEY_UNKNOWN	255


More information about the xorg-commit mailing list