]> Pileus Git - ~andy/gtk/commitdiff
Fixed Bug 554506 – combining diacritics broken, became deadkeys
authorSimos Xenitellis <simos@src.gnome.org>
Wed, 1 Oct 2008 10:53:51 +0000 (10:53 +0000)
committerSimos Xenitellis <simos@src.gnome.org>
Wed, 1 Oct 2008 10:53:51 +0000 (10:53 +0000)
svn path=/trunk/; revision=21557

ChangeLog
gtk/gtkimcontextsimple.c

index a54e118091d27e61a4b47ecd1bd51ea1483cbd6c..95488cb93037526b1529905f76955fe1d2fc7e75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-01  Simos Xenitellis  <simos@gnome.org>
+
+       Bug 554506 – combining diacritics broken, became deadkeys
+
+       * gtk/gtkimcontextsimple.c: added check if keysym is greater
+       than 0x1000000, in this case it is not a dead key.
+
 2008-09-30  Michael Natterer  <mitch@imendio.com>
 
        Bug 553582 – Add orientation API to GtkSeparator
index 459bdd7ea7521fc4aefd61378be927b64e5675cb..a9eeb944baa9f7d1c02dbc2ce4f22043928266ee 100644 (file)
@@ -407,11 +407,19 @@ check_normalize_nfc (gunichar* combination_buffer, gint n_compose)
   return FALSE;
 }
 
-/* When updating the table of the compose sequences, also update here.
+/* Checks if a keysym is a dead key. Dead key keysym values are defined in
+ * ../gdk/gdkkeysyms.h and the first is GDK_dead_grave. As X.Org is updated,
+ * more dead keys are added and we need to update the upper limit.
+ * Also checks if the keysym belongs to the non-spacing mark Unicode category,
+ * by invoking gdk_keyval_to_unicode(). For keysyms like 0x1000000 + 0x0301,
+ * it converts them to 0x301, which makes g_unichar_type() report them as
+ * non-spacing mark. Thus, we check that the value is less then 0x1000000.
+ * check_algorithmically() does not handle keysyms > 0x1000000.
  */
 #define IS_DEAD_KEY(k) \
     (((k) >= GDK_dead_grave && (k) <= (GDK_dead_dasia+1)) || \
-     g_unichar_type (gdk_keyval_to_unicode (k)) == G_UNICODE_NON_SPACING_MARK)
+     ((g_unichar_type (gdk_keyval_to_unicode (k)) == G_UNICODE_NON_SPACING_MARK) && \
+      ((k) < 0x1000000)))
 
 static gboolean
 check_algorithmically (GtkIMContextSimple    *context_simple,