diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-27 11:21:49 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-27 11:21:49 +0200 |
| commit | c1b885dd64387015074b8de350a6a1659913c54c (patch) | |
| tree | 2f774fa6413745c7c8d16bcf4c2db1687aabaae7 /src/keyboard.zig | |
| parent | 9b1197feb3cb0aa8904180b950992d602d57ce41 (diff) | |
| download | river-c1b885dd64387015074b8de350a6a1659913c54c.tar.gz river-c1b885dd64387015074b8de350a6a1659913c54c.tar.xz | |
Clean up some code using c imported enums
Diffstat (limited to 'src/keyboard.zig')
| -rw-r--r-- | src/keyboard.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keyboard.zig b/src/keyboard.zig index 13aac76..86d40d6 100644 --- a/src/keyboard.zig +++ b/src/keyboard.zig @@ -28,14 +28,14 @@ pub const Keyboard = struct { .variant = null, .options = null, }; - const context = c.xkb_context_new(c.enum_xkb_context_flags.XKB_CONTEXT_NO_FLAGS) orelse + const context = c.xkb_context_new(.XKB_CONTEXT_NO_FLAGS) orelse return error.CantCreateXkbContext; defer c.xkb_context_unref(context); const keymap = c.xkb_keymap_new_from_names( context, &rules, - c.enum_xkb_keymap_compile_flags.XKB_KEYMAP_COMPILE_NO_FLAGS, + .XKB_KEYMAP_COMPILE_NO_FLAGS, ) orelse return error.CantCreateXkbKeymap; defer c.xkb_keymap_unref(keymap); @@ -88,7 +88,7 @@ pub const Keyboard = struct { var handled = false; // TODO: These modifiers aren't properly handled, see sway's code const modifiers = c.wlr_keyboard_get_modifiers(wlr_keyboard); - if (event.state == c.enum_wlr_key_state.WLR_KEY_PRESSED) { + if (event.state == .WLR_KEY_PRESSED) { var i: usize = 0; while (i < translated_keysyms_len) : (i += 1) { if (self.handleBuiltinKeybind(translated_keysyms.?[i])) { |
