summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/gdkevents.c2
-rw-r--r--gdk/gdkkeys.c2
-rw-r--r--gdk/gdkkeyuni.c2
-rw-r--r--gdk/mir/gdkmireventsource.c2
-rw-r--r--gdk/quartz/gdkevents-quartz.c4
-rw-r--r--gdk/x11/gdkdevicemanager-core-x11.c2
-rw-r--r--gdk/x11/gdkdevicemanager-xi2.c2
-rw-r--r--gdk/x11/gdkkeys-x11.c2
-rw-r--r--gtk/gtkaccelgroup.c8
-rw-r--r--gtk/gtkbindings.c4
-rw-r--r--gtk/gtkcellrendereraccel.c2
-rw-r--r--gtk/gtkentry.c12
-rw-r--r--gtk/gtkflowbox.c4
-rw-r--r--gtk/gtkimcontextsimple.c4
-rw-r--r--gtk/gtkimmulticontext.c2
-rw-r--r--gtk/gtklabel.c4
-rw-r--r--gtk/gtklistbox.c4
-rw-r--r--gtk/gtkmenushell.c2
-rw-r--r--gtk/gtkprivate.c4
-rw-r--r--gtk/gtkstylecontext.c4
-rw-r--r--gtk/gtktextview.c6
-rw-r--r--gtk/gtkwidget.c2
-rw-r--r--gtk/gtkwindow.c2
-rw-r--r--testsuite/gtk/keyhash.c10
24 files changed, 46 insertions, 46 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 9f788a863d..0e67160c69 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1710,7 +1710,7 @@ gdk_event_triggers_context_menu (const GdkEvent *event)
display = gdk_window_get_display (bevent->any.window);
- modifier = gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ modifier = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_CONTEXT_MENU);
if (modifier != 0 &&
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index 8ef4f9c826..84f9cda201 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -60,7 +60,7 @@
* # Groups # {#key-group-explanation}
*
* One #GdkKeymap object exists for each user display. To obtain keymaps for
- * a display, use gdk_keymap_get_for_display(). A keymap is a mapping from
+ * a display, use gdk_display_get_keymap(). A keymap is a mapping from
* #GdkKeymapKey to key values. You can think of a #GdkKeymapKey as a
* representation of a symbol printed on a physical keyboard key. That is, it
* contains three pieces of information. First, it contains the hardware keycode;
diff --git a/gdk/gdkkeyuni.c b/gdk/gdkkeyuni.c
index d5dce13fd0..d032f6afe7 100644
--- a/gdk/gdkkeyuni.c
+++ b/gdk/gdkkeyuni.c
@@ -907,7 +907,7 @@ gdk_keyval_to_unicode (guint keyval)
if (GDK_IS_WIN32_DISPLAY (gdk_display_get_default ()) &&
keyval == 0xffae)
{
- GdkWin32Keymap *keymap = GDK_WIN32_KEYMAP (gdk_keymap_get_for_display (gdk_display_get_default ()));
+ GdkWin32Keymap *keymap = GDK_WIN32_KEYMAP (gdk_display_get_keymap (gdk_display_get_default ()));
return (guint32) _gdk_win32_keymap_get_decimal_mark (keymap);
}
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index 666047a583..91fca02b9d 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -301,7 +301,7 @@ handle_key_event (GdkWindow *window, const MirInputEvent *event)
_gdk_mir_window_impl_get_cursor_state (impl, NULL, NULL, NULL, &button_state);
modifier_state = get_modifier_state (mir_keyboard_event_modifiers (keyboard_event), button_state);
- keymap = gdk_keymap_get_for_display (gdk_window_get_display (window));
+ keymap = gdk_display_get_keymap (gdk_window_get_display (window));
generate_key_event (window,
mir_keyboard_event_action (keyboard_event) == mir_keyboard_action_up ? GDK_KEY_RELEASE : GDK_KEY_PRESS,
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 822a0a8606..dfbb1f8144 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -1136,7 +1136,7 @@ fill_key_event (GdkWindow *window,
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
- gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (_gdk_display),
+ gdk_keymap_translate_keyboard_state (gdk_display_get_keymap (_gdk_display),
event->key.hardware_keycode,
event->key.state,
event->key.group,
@@ -1190,7 +1190,7 @@ fill_key_event (GdkWindow *window,
* mapped to. Since we only have one virtual modifier in the quartz
* backend, calling the standard function will do.
*/
- gdk_keymap_add_virtual_modifiers (gdk_keymap_get_for_display (_gdk_display),
+ gdk_keymap_add_virtual_modifiers (gdk_display_get_keymap (_gdk_display),
&event->key.state);
event->key.string = NULL;
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
index c4425d5012..e151890013 100644
--- a/gdk/x11/gdkdevicemanager-core-x11.c
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
@@ -193,7 +193,7 @@ translate_key_event (GdkDisplay *display,
GdkEvent *event,
const XEvent *xevent)
{
- GdkKeymap *keymap = gdk_keymap_get_for_display (display);
+ GdkKeymap *keymap = gdk_display_get_keymap (display);
GdkModifierType consumed, state;
event->any.type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE;
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index e6908debb1..40e6aaa578 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1406,7 +1406,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
case XI_KeyRelease:
{
XIDeviceEvent *xev = (XIDeviceEvent *) ev;
- GdkKeymap *keymap = gdk_keymap_get_for_display (display);
+ GdkKeymap *keymap = gdk_display_get_keymap (display);
GdkModifierType consumed, state;
GDK_NOTE (EVENTS,
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index 93a32a13c4..7889b99d1d 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -1416,7 +1416,7 @@ gdk_x11_keymap_get_group_for_state (GdkKeymap *keymap,
else
#endif
{
- GdkX11Keymap *keymap_impl = GDK_X11_KEYMAP (gdk_keymap_get_for_display (display));
+ GdkX11Keymap *keymap_impl = GDK_X11_KEYMAP (gdk_display_get_keymap (display));
update_keymaps (keymap_impl);
return (state & keymap_impl->group_switch_mask) ? 1 : 0;
}
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index c2f40fbcfd..676c800a91 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -1361,7 +1361,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator,
if (keyval && accelerator_codes != NULL)
{
- GdkKeymap *keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+ GdkKeymap *keymap = gdk_display_get_keymap (gdk_display_get_default ());
GdkKeymapKey *keys;
gint n_keys, i, j;
@@ -1483,7 +1483,7 @@ gtk_accelerator_name_with_keycode (GdkDisplay *display,
if (display == NULL)
display = gdk_display_manager_get_default_display (gdk_display_manager_get ());
- gdk_keymap_add_virtual_modifiers (gdk_keymap_get_for_display (display), &accelerator_mods);
+ gdk_keymap_add_virtual_modifiers (gdk_display_get_keymap (display), &accelerator_mods);
gtk_name = gtk_accelerator_name (accelerator_key, accelerator_mods);
if (!accelerator_key)
@@ -1670,7 +1670,7 @@ gtk_accelerator_get_label_with_keycode (GdkDisplay *display,
if (display == NULL)
display = gdk_display_manager_get_default_display (gdk_display_manager_get ());
- gdk_keymap_add_virtual_modifiers (gdk_keymap_get_for_display (display), &accelerator_mods);
+ gdk_keymap_add_virtual_modifiers (gdk_display_get_keymap (display), &accelerator_mods);
gtk_label = gtk_accelerator_get_label (accelerator_key, accelerator_mods);
if (!accelerator_key)
@@ -1759,7 +1759,7 @@ gtk_accelerator_get_default_mod_mask (void)
return GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK;
default_accel_mod_mask =
- gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK);
}
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index ac16ddf848..4234db7c7b 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -1554,7 +1554,7 @@ gtk_bindings_activate (GObject *object,
modifiers = modifiers & BINDING_MOD_MASK () & ~GDK_RELEASE_MASK;
display = gtk_widget_get_display (GTK_WIDGET (object));
- key_hash = binding_key_hash_for_keymap (gdk_keymap_get_for_display (display));
+ key_hash = binding_key_hash_for_keymap (gdk_display_get_keymap (display));
entries = _gtk_key_hash_lookup_keyval (key_hash, keyval, modifiers);
@@ -1593,7 +1593,7 @@ gtk_bindings_activate_event (GObject *object,
return FALSE;
display = gtk_widget_get_display (GTK_WIDGET (object));
- key_hash = binding_key_hash_for_keymap (gdk_keymap_get_for_display (display));
+ key_hash = binding_key_hash_for_keymap (gdk_display_get_keymap (display));
gdk_event_get_keycode ((GdkEvent *)event, &keycode);
gdk_event_get_state ((GdkEvent *)event, &state);
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c
index 1db7c20cdc..5e8da11a76 100644
--- a/gtk/gtkcellrendereraccel.c
+++ b/gtk/gtkcellrendereraccel.c
@@ -589,7 +589,7 @@ gtk_cell_editable_widget_key_press_event (GtkWidget *widget,
}
else
{
- _gtk_translate_keyboard_accel_state (gdk_keymap_get_for_display (display),
+ _gtk_translate_keyboard_accel_state (gdk_display_get_keymap (display),
keycode,
state,
gtk_accelerator_get_default_mod_mask (),
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 14e2e27d53..df603b9076 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2768,7 +2768,7 @@ gtk_entry_dispose (GObject *object)
priv->buffer = NULL;
}
- keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (object)));
+ keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (object)));
g_signal_handlers_disconnect_by_func (keymap, keymap_state_changed, entry);
g_signal_handlers_disconnect_by_func (keymap, keymap_direction_changed, entry);
G_OBJECT_CLASS (gtk_entry_parent_class)->dispose (object);
@@ -4250,7 +4250,7 @@ gtk_entry_focus_in (GtkWidget *widget,
gtk_widget_queue_draw (widget);
- keymap = gdk_keymap_get_for_display (gtk_widget_get_display (widget));
+ keymap = gdk_display_get_keymap (gtk_widget_get_display (widget));
if (priv->editable)
{
@@ -4295,7 +4295,7 @@ gtk_entry_focus_out (GtkWidget *widget,
gtk_widget_queue_draw (widget);
- keymap = gdk_keymap_get_for_display (gtk_widget_get_display (widget));
+ keymap = gdk_display_get_keymap (gtk_widget_get_display (widget));
if (priv->editable)
{
@@ -4846,7 +4846,7 @@ get_better_cursor_x (GtkEntry *entry,
gint offset)
{
GtkEntryPrivate *priv = entry->priv;
- GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry)));
+ GdkKeymap *keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (entry)));
PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
gboolean split_cursor;
@@ -5701,7 +5701,7 @@ gtk_entry_create_layout (GtkEntry *entry,
if (gtk_widget_has_focus (widget))
{
GdkDisplay *display = gtk_widget_get_display (widget);
- GdkKeymap *keymap = gdk_keymap_get_for_display (display);
+ GdkKeymap *keymap = gdk_display_get_keymap (display);
if (gdk_keymap_get_direction (keymap) == PANGO_DIRECTION_RTL)
pango_dir = PANGO_DIRECTION_RTL;
else
@@ -6372,7 +6372,7 @@ gtk_entry_move_visually (GtkEntry *entry,
strong = TRUE;
else
{
- GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry)));
+ GdkKeymap *keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (entry)));
PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
strong = keymap_direction == priv->resolved_dir;
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index e8205bdaca..ca74b92e34 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -3007,9 +3007,9 @@ gtk_flow_box_add_move_binding (GtkBindingSet *binding_set,
display = gdk_display_get_default ();
if (display)
{
- extend_mod_mask = gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ extend_mod_mask = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_EXTEND_SELECTION);
- modify_mod_mask = gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ modify_mod_mask = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
}
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index e402ea67ee..036eca9d09 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1096,7 +1096,7 @@ static guint
canonical_hex_keyval (GdkEventKey *event)
{
GdkWindow *window = gdk_event_get_window ((GdkEvent *) event);
- GdkKeymap *keymap = gdk_keymap_get_for_display (gdk_window_get_display (window));
+ GdkKeymap *keymap = gdk_display_get_keymap (gdk_window_get_display (window));
guint keyval, event_keyval;
guint *keyvals = NULL;
gint n_vals = 0;
@@ -1157,7 +1157,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
GtkIMContextSimplePrivate *priv = context_simple->priv;
GdkWindow *window = gdk_event_get_window ((GdkEvent *) event);
GdkDisplay *display = gdk_window_get_display (window);
- GdkKeymap *keymap = gdk_keymap_get_for_display (display);
+ GdkKeymap *keymap = gdk_display_get_keymap (display);
GSList *tmp_list;
int n_compose = 0;
GdkModifierType hex_mod_mask;
diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c
index 6bab682295..2b62df60c0 100644
--- a/gtk/gtkimmulticontext.c
+++ b/gtk/gtkimmulticontext.c
@@ -366,7 +366,7 @@ gtk_im_multicontext_filter_keypress (GtkIMContext *context,
display = gdk_window_get_display (gdk_event_get_window ((GdkEvent *) event));
no_text_input_mask =
- gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_NO_TEXT_INPUT);
if (gdk_event_get_event_type ((GdkEvent *) event) == GDK_KEY_PRESS &&
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index bfa7a0a641..6dfb0f07ad 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -5647,7 +5647,7 @@ get_better_cursor (GtkLabel *label,
gint *y)
{
GtkLabelPrivate *priv = gtk_label_get_instance_private (label);
- GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (label)));
+ GdkKeymap *keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (label)));
PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
PangoDirection cursor_direction = get_cursor_direction (label);
gboolean split_cursor;
@@ -5753,7 +5753,7 @@ gtk_label_move_visually (GtkLabel *label,
strong = TRUE;
else
{
- GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (label)));
+ GdkKeymap *keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (label)));
PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
strong = keymap_direction == get_cursor_direction (label);
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index ae47425a94..a3c638d581 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1415,9 +1415,9 @@ gtk_list_box_add_move_binding (GtkBindingSet *binding_set,
display = gdk_display_get_default ();
if (display)
{
- extend_mod_mask = gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ extend_mod_mask = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_EXTEND_SELECTION);
- modify_mod_mask = gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ modify_mod_mask = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
}
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 24548e3c73..3f4f0837e3 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -1528,7 +1528,7 @@ gtk_menu_shell_get_key_hash (GtkMenuShell *menu_shell,
if (!priv->key_hash && create)
{
GtkMnemonicHash *mnemonic_hash = gtk_menu_shell_get_mnemonic_hash (menu_shell, FALSE);
- GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (widget));
+ GdkKeymap *keymap = gdk_display_get_keymap (gtk_widget_get_display (widget));
if (!mnemonic_hash)
return NULL;
diff --git a/gtk/gtkprivate.c b/gtk/gtkprivate.c
index 02448d7f92..52240f61f9 100644
--- a/gtk/gtkprivate.c
+++ b/gtk/gtkprivate.c
@@ -196,9 +196,9 @@ _gtk_get_primary_accel_mod (void)
{
GdkDisplay *display = gdk_display_get_default ();
- primary = gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ primary = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR);
- primary = _gtk_replace_virtual_modifiers (gdk_keymap_get_for_display (display),
+ primary = _gtk_replace_virtual_modifiers (gdk_display_get_keymap (display),
primary);
}
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index f70bc3a8b6..b309f15e81 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1907,7 +1907,7 @@ gtk_render_insertion_cursor (GtkStyleContext *context,
"gtk-split-cursor", &split_cursor,
NULL);
- keymap_direction = gdk_keymap_get_direction (gdk_keymap_get_for_display (priv->display));
+ keymap_direction = gdk_keymap_get_direction (gdk_display_get_keymap (priv->display));
pango_layout_get_cursor_pos (layout, index, &strong_pos, &weak_pos);
@@ -1992,7 +1992,7 @@ gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot,
"gtk-split-cursor", &split_cursor,
NULL);
- keymap_direction = gdk_keymap_get_direction (gdk_keymap_get_for_display (priv->display));
+ keymap_direction = gdk_keymap_get_direction (gdk_display_get_keymap (priv->display));
pango_layout_get_cursor_pos (layout, index, &strong_pos, &weak_pos);
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index c4b19710f4..cf4217c08b 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5402,7 +5402,7 @@ gtk_text_view_focus_in_event (GtkWidget *widget, GdkEventFocus *event)
gtk_text_view_check_cursor_blink (text_view);
}
- g_signal_connect (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
+ g_signal_connect (gdk_display_get_keymap (gtk_widget_get_display (widget)),
"direction-changed",
G_CALLBACK (keymap_direction_changed), text_view);
gtk_text_view_check_keymap_direction (text_view);
@@ -5437,7 +5437,7 @@ gtk_text_view_focus_out_event (GtkWidget *widget, GdkEventFocus *event)
gtk_text_layout_set_cursor_visible (priv->layout, FALSE);
}
- g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
+ g_signal_handlers_disconnect_by_func (gdk_display_get_keymap (gtk_widget_get_display (widget)),
keymap_direction_changed,
text_view);
gtk_text_view_selection_bubble_popup_unset (text_view);
@@ -7532,7 +7532,7 @@ gtk_text_view_check_keymap_direction (GtkTextView *text_view)
if (priv->layout)
{
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (text_view));
- GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (text_view)));
+ GdkKeymap *keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (text_view)));
GtkTextDirection new_cursor_dir;
GtkTextDirection new_keyboard_dir;
gboolean split_cursor;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 6dbcaea36b..13f9cd59a8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13696,7 +13696,7 @@ gtk_widget_get_modifier_mask (GtkWidget *widget,
display = gtk_widget_get_display (widget);
- return gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ return gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
intent);
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 7b14139179..23b1d2b0fb 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -10313,7 +10313,7 @@ gtk_window_get_key_hash (GtkWindow *window)
if (key_hash)
return key_hash;
- key_hash = _gtk_key_hash_new (gdk_keymap_get_for_display (window->priv->display),
+ key_hash = _gtk_key_hash_new (gdk_display_get_keymap (window->priv->display),
(GDestroyNotify)window_key_entry_destroy);
_gtk_window_keys_foreach (window, add_to_key_hash, key_hash);
g_object_set_qdata (G_OBJECT (window), quark_gtk_window_key_hash, key_hash);
diff --git a/testsuite/gtk/keyhash.c b/testsuite/gtk/keyhash.c
index ecbe1ad775..4b080cd3cc 100644
--- a/testsuite/gtk/keyhash.c
+++ b/testsuite/gtk/keyhash.c
@@ -36,7 +36,7 @@ test_basic (void)
GtkKeyHash *hash;
GSList *keys;
- keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+ keymap = gdk_display_get_keymap (gdk_display_get_default ());
count = 0;
hash = _gtk_key_hash_new (keymap, counting_destroy);
@@ -78,7 +78,7 @@ test_lookup (GtkKeyHash *hash,
GdkKeymapKey *keys;
gint n_keys;
- keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+ keymap = gdk_display_get_keymap (gdk_display_get_default ());
gdk_keymap_get_entries_for_keyval (keymap, keyval, &keys, &n_keys);
if (n_keys == 0)
@@ -130,7 +130,7 @@ test_match (void)
{ 0, 0 }
};
- keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+ keymap = gdk_display_get_keymap (gdk_display_get_default ());
hash = _gtk_key_hash_new (keymap, NULL);
add_entries (hash, entries);
@@ -150,7 +150,7 @@ hyper_equals_super (void)
GdkKeymap *keymap;
GdkModifierType mods1, mods2;
- keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+ keymap = gdk_display_get_keymap (gdk_display_get_default ());
mods1 = GDK_HYPER_MASK;
gdk_keymap_map_virtual_modifiers (keymap, &mods1);
@@ -175,7 +175,7 @@ test_virtual (void)
{ 0, 0 }
};
- keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+ keymap = gdk_display_get_keymap (gdk_display_get_default ());
hash = _gtk_key_hash_new (keymap, NULL);
add_entries (hash, entries);