+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
+2002-03-01 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case)
+ * gdk/x11/gdkkeys-x11.c (gdk_keyval_convert_case): If the keyval
+ to be converted is one of those that consist of a Unicode
+ character plus our special flag bit, use the
+ g_unichar_to{lower,upper} functions (Bug#73112).
+
+ * gdk/gdkkeys.c (gdk_keyval_convert_case): Drop the #ifdefs for
+ the GDK keysym symbols. As we include gdkkeysyms.h, we know they
+ are there. And if GDK keysyms some day are added/removed, this
+ function needs changes, too, anyway.
+
Fri Mar 1 17:00:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpolyreg-generic.c: Fix some reported (but not significant)
guint xlower = symbol;
guint xupper = symbol;
+ /* Check for directly encoded 24-bit UCS characters: */
+ if ((symbol & 0xff000000) == 0x01000000)
+ {
+ if (lower)
+ *lower = gdk_unicode_to_keyval (g_unichar_tolower (symbol & 0x00ffffff));
+ if (upper)
+ *upper = gdk_unicode_to_keyval (g_unichar_toupper (symbol & 0x00ffffff));
+ return;
+ }
+
switch (symbol >> 8)
{
-#if defined (GDK_A) && defined (GDK_Ooblique)
case 0: /* Latin 1 */
if ((symbol >= GDK_A) && (symbol <= GDK_Z))
xlower += (GDK_a - GDK_A);
else if ((symbol >= GDK_oslash) && (symbol <= GDK_thorn))
xupper -= (GDK_oslash - GDK_Ooblique);
break;
-#endif /* LATIN1 */
-#if defined (GDK_Aogonek) && defined (GDK_tcedilla)
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol == GDK_Aogonek)
else if (symbol >= GDK_racute && symbol <= GDK_tcedilla)
xupper -= (GDK_racute - GDK_Racute);
break;
-#endif /* LATIN2 */
-#if defined (GDK_Hstroke) && defined (GDK_Cabovedot)
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Hstroke && symbol <= GDK_Hcircumflex)
else if (symbol >= GDK_cabovedot && symbol <= GDK_scircumflex)
xupper -= (GDK_cabovedot - GDK_Cabovedot);
break;
-#endif /* LATIN3 */
-#if defined (GDK_Rcedilla) && defined (GDK_Amacron)
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Rcedilla && symbol <= GDK_Tslash)
else if (symbol >= GDK_amacron && symbol <= GDK_umacron)
xupper -= (GDK_amacron - GDK_Amacron);
break;
-#endif /* LATIN4 */
-#if defined (GDK_Serbian_DJE) && defined (GDK_Cyrillic_yu)
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Serbian_DJE && symbol <= GDK_Serbian_DZE)
else if (symbol >= GDK_Cyrillic_yu && symbol <= GDK_Cyrillic_hardsign)
xupper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
break;
-#endif /* CYRILLIC */
-#if defined (GDK_Greek_ALPHAaccent) && defined (GDK_Greek_finalsmallsigma)
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Greek_ALPHAaccent && symbol <= GDK_Greek_OMEGAaccent)
symbol != GDK_Greek_finalsmallsigma)
xupper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
break;
-#endif /* GREEK */
}
if (lower)
KeySym xlower = 0;
KeySym xupper = 0;
+ /* Check for directly encoded 24-bit UCS characters: */
+ if ((symbol & 0xff000000) == 0x01000000)
+ {
+ if (lower)
+ *lower = gdk_unicode_to_keyval (g_unichar_tolower (symbol & 0x00ffffff));
+ if (upper)
+ *upper = gdk_unicode_to_keyval (g_unichar_toupper (symbol & 0x00ffffff));
+ return;
+ }
+
if (symbol)
XConvertCase (symbol, &xlower, &xupper);