diff options
author | Fredy Paquet <fredy@opag.ch> | 2016-02-26 17:21:26 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2016-02-26 17:24:32 +0000 |
commit | 0a6ee5e2cfe365e9ff6d391193edecf511d3a962 (patch) | |
tree | 511df8ff900a11106dcb12b02f38626334afcf57 /gdk/gdkkeyuni.c | |
parent | 9f606b827092e2edd887686507cd6e4bb368bb07 (diff) | |
download | gtk+-0a6ee5e2cfe365e9ff6d391193edecf511d3a962.tar.gz |
W32: Fix for commit 1f74f12d9, re-enabling decimal separator key
1f74f12d9 rendered entry of keypad decimal mark unuseable for
several national keyboard layouts, this commit amends that, at
least for W32, and makes GTK+ behave more or less the same way
W32 behaves.
The patch works like this:
- When typing the first character at the keyboard or when switching
keyboard layouts, the decimal mark character will be cached in the
static variable "decimal_mark" within gdkkeys-win32.c
- in case of WIN32, gdk_keyval_to_unicode() asks gdkkeys-win32.c for the
current decimal_mark when converting GDK_KEY_KP_Decimal.
https://bugzilla.gnome.org/show_bug.cgi?id=756751
Diffstat (limited to 'gdk/gdkkeyuni.c')
-rw-r--r-- | gdk/gdkkeyuni.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdk/gdkkeyuni.c b/gdk/gdkkeyuni.c index d770737ccc..4b4431f997 100644 --- a/gdk/gdkkeyuni.c +++ b/gdk/gdkkeyuni.c @@ -27,6 +27,10 @@ #include "gdkkeys.h" #include "gdktypes.h" +#ifdef GDK_WINDOWING_WIN32 +#include "win32/gdkwin32.h" +#include "win32/gdkprivate-win32.h" +#endif /* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode * mapping functions, from the xterm sources. @@ -899,6 +903,14 @@ gdk_keyval_to_unicode (guint keyval) if ((keyval & 0xff000000) == 0x01000000) return keyval & 0x00ffffff; +#if defined(GDK_WINDOWING_WIN32) + if (GDK_IS_WIN32_DISPLAY (gdk_display_get_default ())) + { + if (keyval == 0xffae) + return (guint32) _gdk_win32_keymap_get_decimal_mark (); + } +#endif + /* binary search in table */ while (max >= min) { mid = (min + max) / 2; |