summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-05 11:03:28 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-06 01:40:49 -0400
commit4495bacfd11ce2229d8c7124eed1a419265eadc0 (patch)
treec8b2fd39aa23c43994370484e1d42405541a9618 /gtk/gtkimcontextsimple.c
parent234a21905c04327b8d976beeb54701ec60d6e07b (diff)
downloadgtk+-4495bacfd11ce2229d8c7124eed1a419265eadc0.tar.gz
gtk: Use display apis for keymap mapping
This removes the last uses of GdkKeymap from GTK.
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 4f6e2ce441..b5b868c7c0 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -982,14 +982,12 @@ is_hex_keyval (guint keyval)
static guint
canonical_hex_keyval (GdkEvent *event)
{
- GdkSurface *surface = gdk_event_get_surface ((GdkEvent *) event);
- GdkKeymap *keymap = gdk_display_get_keymap (gdk_surface_get_display (surface));
guint keyval, event_keyval;
guint *keyvals = NULL;
gint n_vals = 0;
gint i;
- event_keyval = gdk_key_event_get_keyval ((GdkEvent *)event);
+ event_keyval = gdk_key_event_get_keyval (event);
/* See if the keyval is already a hex digit */
if (is_hex_keyval (event_keyval))
@@ -998,10 +996,10 @@ canonical_hex_keyval (GdkEvent *event)
/* See if this key would have generated a hex keyval in
* any other state, and return that hex keyval if so
*/
- gdk_keymap_get_entries_for_keycode (keymap,
- gdk_key_event_get_scancode ((GdkEvent *) event),
- NULL,
- &keyvals, &n_vals);
+ gdk_display_map_keycode (gdk_event_get_display (event),
+ gdk_key_event_get_scancode (event),
+ NULL,
+ &keyvals, &n_vals);
keyval = 0;
i = 0;