From 56400a5955603b8760a27f49ac4b33bcaa86b73c Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 23 Apr 2020 17:27:18 +0200 Subject: Fix crash on non-toplevel views --- src/keyboard.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/keyboard.zig') diff --git a/src/keyboard.zig b/src/keyboard.zig index 4be0ccb..13aac76 100644 --- a/src/keyboard.zig +++ b/src/keyboard.zig @@ -17,7 +17,7 @@ pub const Keyboard = struct { pub fn init(self: *Self, seat: *Seat, device: *c.wlr_input_device) !void { self.seat = seat; self.device = device; - self.wlr_keyboard = device.unnamed_133.keyboard; + self.wlr_keyboard = device.unnamed_134.keyboard; // We need to prepare an XKB keymap and assign it to the keyboard. This // assumes the defaults (e.g. layout = "us"). @@ -60,7 +60,7 @@ pub const Keyboard = struct { @alignCast(@alignOf(*c.wlr_event_keyboard_key), data), ); - const wlr_keyboard: *c.wlr_keyboard = self.device.unnamed_133.keyboard; + const wlr_keyboard: *c.wlr_keyboard = self.device.unnamed_134.keyboard; // Translate libinput keycode -> xkbcommon const keycode = event.keycode + 8; -- cgit v1.2.3