Skip to content
Permalink
Browse files

plugins: avoid deprecated 'gdk_keymap_get_default'

  • Loading branch information...
sc0w committed Jul 12, 2018
1 parent b264cff commit 3fe98d7d01238bfacd793110b4b2c8b9a8d93609
Showing with 4 additions and 4 deletions.
  1. +2 −2 plugins/common/eggaccelerators.c
  2. +2 −2 plugins/common/msd-keygrab.c
@@ -387,7 +387,7 @@ egg_accelerator_parse_virtual (const gchar *accelerator,
GdkKeymapKey *keys;
gint n_keys, i, j;

if (!gdk_keymap_get_entries_for_keyval (gdk_keymap_get_default(), keyval, &keys, &n_keys)) {
if (!gdk_keymap_get_entries_for_keyval (gdk_keymap_get_for_display (gdk_display_get_default ()), keyval, &keys, &n_keys)) {
bad_keyval = TRUE;
} else {
*accelerator_codes = g_new0 (guint, n_keys + 1);
@@ -647,7 +647,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.
@@ -58,7 +58,7 @@ setup_modifiers (void)
/* NumLock can be assigned to varying keys so we need to
* resolve and ignore it specially */
dynmods = 0;
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,
&dynmods);

@@ -222,7 +222,7 @@ match_key (Key *key, XEvent *event)
group = (event->xkey.state & GDK_KEY_Mode_switch) ? 1 : 0;

/* Check if we find a keysym that matches our current state */
if (gdk_keymap_translate_keyboard_state (gdk_keymap_get_default(), event->xkey.keycode,
if (gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (gdk_display_get_default ()), event->xkey.keycode,
event->xkey.state, group,
&keyval, NULL, NULL, &consumed)) {
guint lower, upper;

0 comments on commit 3fe98d7

Please sign in to comment.
You can’t perform that action at this time.