gdk/gdkkeys.c (gdk_keyval_convert_case) If the keyval to be converted is

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.
This commit is contained in:
Tor Lillqvist
2002-03-01 22:09:27 +00:00
committed by Tor Lillqvist
parent b924594ef1
commit d237e8557d
9 changed files with 111 additions and 12 deletions

View File

@ -892,6 +892,16 @@ gdk_keyval_convert_case (guint symbol,
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);