summaryrefslogtreecommitdiff
path: root/i3lock.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2014-01-18 19:20:58 +0100
committerMichael Stapelberg <michael@stapelberg.de>2014-06-21 16:32:18 +0200
commit7eb43aeabd7a5eb71927520c427debb45eab05f2 (patch)
tree97d109656f46fea402ceaa5a2e0daf84378266f4 /i3lock.c
parent0beb9a47b1cfaf868c3610b2748d0fa6988c658e (diff)
little cleanups thanks to Ran Benita’s review
Diffstat (limited to 'i3lock.c')
-rw-r--r--i3lock.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/i3lock.c b/i3lock.c
index f81ea18..4c8668d 100644
--- a/i3lock.c
+++ b/i3lock.c
@@ -110,8 +110,7 @@ static bool load_keymap(void) {
}
}
- if (xkb_keymap != NULL)
- xkb_keymap_unref(xkb_keymap);
+ xkb_keymap_unref(xkb_keymap);
int32_t device_id = xkb_x11_get_core_keyboard_device_id(conn);
DEBUG("device = %d\n", device_id);
@@ -127,15 +126,7 @@ static bool load_keymap(void) {
return false;
}
- /* Get the initial modifier state to be in sync with the X server.
- * See https://github.com/xkbcommon/libxkbcommon/issues/1 for why we ignore
- * the base and latched fields. */
- //xkb_state_update_mask(new_state,
- // 0, 0, new_state->components.locked_mods,
- // 0, 0, new_state->components.locked_group);
-
- if (xkb_state != NULL)
- xkb_state_unref(xkb_state);
+ xkb_state_unref(xkb_state);
xkb_state = new_state;
return true;