From cc55ee472d9c186a09fb8cfb75472a9202b6f711 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 28 Feb 2015 15:03:53 +0100 Subject: [PATCH 1/2] debian: update changelog --- debian/changelog | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 02fb0e53..3b5cdb21 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -i3-wm (4.8.1-1) unstable; urgency=medium +i3-wm (4.9.1-1) experimental; urgency=medium - * NOT YET RELEASED + * NOT YET RELEASED. - -- Michael Stapelberg Sun, 15 Jun 2014 19:37:32 +0200 + -- Michael Stapelberg Sat, 28 Feb 2015 15:04:25 +0100 + +i3-wm (4.9-1) experimental; urgency=medium + + * New upstream release. + + -- Michael Stapelberg Sat, 28 Feb 2015 14:53:34 +0100 i3-wm (4.8-2) unstable; urgency=medium From 1ab76fb05ad146987faeea83f5f04967c640a9d3 Mon Sep 17 00:00:00 2001 From: Steven McDonald Date: Sun, 1 Mar 2015 18:30:45 +1100 Subject: [PATCH 2/2] Fix key bindings on big-endian platforms input_code is a uint16_t, but xcb_keycode_t is uint8_t, meaning that only the first byte of input_code is inspected by memmem. On little-endian platforms, this code would have worked by accident, since the first byte of input_code represents the 8 least significant bits. However, on big-endian platforms the first byte is the 8 most significant bits, which means memmem is scanning bind->translated_to for the wrong keycode (probably 0). In order to work correctly on big-endian and little-endian platforms, simply typecast input_code to an xcb_keycode_t and pass that to memmem. The observed behaviour associated with this bug is that key bindings don't work at all. This patch has been tested on an iBook G4 running OpenBSD -current, and key bindings work properly with this fix applied. --- src/bindings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindings.c b/src/bindings.c index 8f9767e6..e7e424cc 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -159,9 +159,10 @@ static Binding *get_binding(uint16_t modifiers, bool is_release, uint16_t input_ * need to look in the array of translated keycodes for the event’s * keycode */ if (input_type == B_KEYBOARD && bind->symbol != NULL) { + xcb_keycode_t input_keycode = (xcb_keycode_t)input_code; if (memmem(bind->translated_to, bind->number_keycodes * sizeof(xcb_keycode_t), - &input_code, sizeof(xcb_keycode_t)) == NULL) + &input_keycode, sizeof(xcb_keycode_t)) == NULL) continue; } else { /* This case is easier: The user specified a keycode */