aboutsummaryrefslogtreecommitdiff
path: root/src/keyboard.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-04-23 17:27:18 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-04-23 17:27:18 +0200
commit56400a5955603b8760a27f49ac4b33bcaa86b73c (patch)
treeb7059dac75f9a908bf479fe489fbc0d5835328f0 /src/keyboard.zig
parent0452f9ec23a847a624ed4f25098bdd94b2e2038c (diff)
downloadriver-56400a5955603b8760a27f49ac4b33bcaa86b73c.tar.gz
river-56400a5955603b8760a27f49ac4b33bcaa86b73c.tar.xz
Fix crash on non-toplevel views
Diffstat (limited to 'src/keyboard.zig')
-rw-r--r--src/keyboard.zig4
1 files changed, 2 insertions, 2 deletions
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;