Skip to content

Commit

Permalink
capplets/keybindings: avoid deprecated 'gdk_keymap_get_default'
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w committed Jul 13, 2018
1 parent 657b706 commit d5c8249
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion capplets/keybindings/eggaccelerators.c
Expand Up @@ -607,7 +607,7 @@ egg_keymap_get_modmap (GdkKeymap *keymap)
EggModmap *modmap;

if (keymap == NULL)
keymap = gdk_keymap_get_default ();
keymap = gdk_keymap_get_for_display (gdk_display_get_default ());

/* This is all a hack, much simpler when we can just
* modify GDK directly.
Expand Down
4 changes: 2 additions & 2 deletions capplets/keybindings/eggcellrendererkeys.c
Expand Up @@ -391,7 +391,7 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
cleared = FALSE;

consumed_modifiers = 0;
gdk_keymap_translate_keyboard_state(gdk_keymap_get_default(),
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (gdk_display_get_default ()),
event->hardware_keycode,
event->state,
event->group,
Expand All @@ -411,7 +411,7 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
consumed_modifiers &= ~(GDK_SHIFT_MASK);
}

egg_keymap_resolve_virtual_modifiers(gdk_keymap_get_default(),
egg_keymap_resolve_virtual_modifiers (gdk_keymap_get_for_display (gdk_display_get_default ()),
EGG_VIRTUAL_NUM_LOCK_MASK |
EGG_VIRTUAL_SCROLL_LOCK_MASK |
EGG_VIRTUAL_LOCK_MASK,
Expand Down

0 comments on commit d5c8249

Please sign in to comment.