summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkkeys-x11.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2002-03-01 22:09:27 +0000
committerTor Lillqvist <tml@src.gnome.org>2002-03-01 22:09:27 +0000
commitd237e8557d275e43ec80f892df9ae4d5dcc82bcc (patch)
tree5e3e1f83e0760a66d1d43cc829a5fda38a055fac /gdk/x11/gdkkeys-x11.c
parentb924594ef150ba5ee2bd40068bdbb3fdbbd401fa (diff)
downloadgtk+-d237e8557d275e43ec80f892df9ae4d5dcc82bcc.tar.gz
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.
Diffstat (limited to 'gdk/x11/gdkkeys-x11.c')
-rw-r--r--gdk/x11/gdkkeys-x11.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index 9d2677b44b..027090f2da 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -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);