]> Pileus Git - ~andy/gtk/commitdiff
Check if gdk_unicode_to_keyval() worked before using the result. Makes
authorRichard Hult <richard@imendio.com>
Sun, 4 May 2008 15:15:00 +0000 (15:15 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sun, 4 May 2008 15:15:00 +0000 (15:15 +0000)
2008-05-04  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkkeys-quartz.c (maybe_update_keymap): Check if
gdk_unicode_to_keyval() worked before using the result. Makes
function keys work, bug #530156. Also add F16 to the function key
map.

svn path=/trunk/; revision=20071

ChangeLog
gdk/quartz/gdkkeys-quartz.c

index 1ae7aa8bb861d32c082cecc519e6958646349193..f258e95d523a51620e40e48edb86b3dcf0e540ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-04  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkkeys-quartz.c (maybe_update_keymap): Check if
+       gdk_unicode_to_keyval() worked before using the result. Makes
+       function keys work, bug #530156. Also add F16 to the function key
+       map.
+
 2008-05-04  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkkeys-quartz.c (maybe_update_keymap): Remove stray
index 7cfd2e0dd75b8286b2daf7848f52ea053469c409..e9db7e4c9ae420c4ef8669c6695f1946579b382c 100644 (file)
@@ -128,7 +128,8 @@ const static struct {
   { 111, GDK_F12, 0 },
   { 105, GDK_F13, 0 },
   { 107, GDK_F14, 0 },
-  { 113, GDK_F15, 0 }
+  { 113, GDK_F15, 0 },
+  { 106, GDK_F16, 0 }
 };
 
 const static struct {
@@ -255,7 +256,15 @@ maybe_update_keymap (void)
                        p[j] = GDK_ISO_Left_Tab;
 
                      if (!found)
-                       p[j] = gdk_unicode_to_keyval (uc);
+                        {
+                          guint tmp;
+                          
+                          tmp = gdk_unicode_to_keyval (uc);
+                          if (tmp != (uc | 0x01000000))
+                            p[j] = tmp;
+                          else
+                            p[j] = 0;
+                        }
                    }
                }
              
@@ -330,7 +339,15 @@ maybe_update_keymap (void)
                        p[j] = GDK_ISO_Left_Tab;
                      
                      if (!found)
-                       p[j] = gdk_unicode_to_keyval (uc);
+                        {
+                          guint tmp;
+                          
+                          tmp = gdk_unicode_to_keyval (uc);
+                          if (tmp != (uc | 0x01000000))
+                            p[j] = tmp;
+                          else
+                            p[j] = 0;
+                        }
                    }
                }