diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-28 19:16:01 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-28 19:16:01 +0200 |
| commit | d962e6a9a584e21623ee1cb2439c74d166aceaa0 (patch) | |
| tree | 97b8c8b52fc1221de15c99459c43346fb5b39744 /src/keyboard.zig | |
| parent | 7988a2e9348ddbe60a24cbead76ae7c662f3c73a (diff) | |
| download | river-d962e6a9a584e21623ee1cb2439c74d166aceaa0.tar.gz river-d962e6a9a584e21623ee1cb2439c74d166aceaa0.tar.xz | |
Workaround global anonymous field name counter
Fixes https://github.com/ifreund/river/issues/17
Diffstat (limited to 'src/keyboard.zig')
| -rw-r--r-- | src/keyboard.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keyboard.zig b/src/keyboard.zig index 86d40d6..c1a46dc 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_134.keyboard; + self.wlr_keyboard = @field(device, c.wlr_input_device_union).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_134.keyboard; + const wlr_keyboard = self.wlr_keyboard; // Translate libinput keycode -> xkbcommon const keycode = event.keycode + 8; |
