deps: update to Zig 0.10

This commit is contained in:
Isaac Freund
2022-11-05 00:29:51 +01:00
parent f370202b68
commit 09f3f141ae
30 changed files with 81 additions and 148 deletions

View File

@ -49,7 +49,7 @@ const PointerConstraint = @import("PointerConstraint.zig");
pub const FocusTarget = union(enum) {
view: *View,
xwayland_override_redirect: if (build_options.xwayland) *XwaylandOverrideRedirect else void,
xwayland_override_redirect: if (build_options.xwayland) *XwaylandOverrideRedirect else noreturn,
layer: *LayerSurface,
lock_surface: *LockSurface,
none: void,
@ -224,12 +224,7 @@ pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void {
// Obtain the target surface
const target_surface = switch (new_focus) {
.view => |target_view| target_view.surface.?,
.xwayland_override_redirect => |target_override_redirect| blk: {
assert(build_options.xwayland);
// TODO(zig): remove this line when updating to the self hosted compiler.
if (!build_options.xwayland) return;
break :blk target_override_redirect.xwayland_surface.surface;
},
.xwayland_override_redirect => |target_or| target_or.xwayland_surface.surface,
.layer => |target_layer| target_layer.wlr_layer_surface.surface,
.lock_surface => |lock_surface| lock_surface.wlr_lock_surface.surface,
.none => null,
@ -454,7 +449,7 @@ pub fn clearRepeatingMapping(self: *Self) void {
}
/// Repeat key mapping
fn handleMappingRepeatTimeout(self: *Self) callconv(.C) c_int {
fn handleMappingRepeatTimeout(self: *Self) c_int {
if (self.repeating_mapping) |mapping| {
const rate = server.config.repeat_rate;
const ms_delay = if (rate > 0) 1000 / rate else 0;