code: remove now unnecessary zig fmt directives

zig fmt does what we want since zig 0.8.0
This commit is contained in:
Isaac Freund 2021-06-08 03:20:56 +00:00
parent 1bacaa5b43
commit 021fd8f376
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
11 changed files with 2 additions and 26 deletions

View File

@ -68,7 +68,6 @@ pressed_count: u32 = 0,
axis: wl.Listener(*wlr.Pointer.event.Axis) = wl.Listener(*wlr.Pointer.event.Axis).init(handleAxis), axis: wl.Listener(*wlr.Pointer.event.Axis) = wl.Listener(*wlr.Pointer.event.Axis).init(handleAxis),
frame: wl.Listener(*wlr.Cursor) = wl.Listener(*wlr.Cursor).init(handleFrame), frame: wl.Listener(*wlr.Cursor) = wl.Listener(*wlr.Cursor).init(handleFrame),
// zig fmt: off
button: wl.Listener(*wlr.Pointer.event.Button) = button: wl.Listener(*wlr.Pointer.event.Button) =
wl.Listener(*wlr.Pointer.event.Button).init(handleButton), wl.Listener(*wlr.Pointer.event.Button).init(handleButton),
motion_absolute: wl.Listener(*wlr.Pointer.event.MotionAbsolute) = motion_absolute: wl.Listener(*wlr.Pointer.event.MotionAbsolute) =
@ -89,7 +88,6 @@ swipe_update: wl.Listener(*wlr.Pointer.event.SwipeUpdate) =
wl.Listener(*wlr.Pointer.event.SwipeUpdate).init(handleSwipeUpdate), wl.Listener(*wlr.Pointer.event.SwipeUpdate).init(handleSwipeUpdate),
swipe_end: wl.Listener(*wlr.Pointer.event.SwipeEnd) = swipe_end: wl.Listener(*wlr.Pointer.event.SwipeEnd) =
wl.Listener(*wlr.Pointer.event.SwipeEnd).init(handleSwipeEnd), wl.Listener(*wlr.Pointer.event.SwipeEnd).init(handleSwipeEnd),
// zig fmt: on
pub fn init(self: *Self, seat: *Seat) !void { pub fn init(self: *Self, seat: *Seat) !void {
const wlr_cursor = try wlr.Cursor.create(); const wlr_cursor = try wlr.Cursor.create();

View File

@ -28,12 +28,10 @@ const Server = @import("Server.zig");
xdg_toplevel_decoration: *wlr.XdgToplevelDecorationV1, xdg_toplevel_decoration: *wlr.XdgToplevelDecorationV1,
// zig fmt: off
destroy: wl.Listener(*wlr.XdgToplevelDecorationV1) = destroy: wl.Listener(*wlr.XdgToplevelDecorationV1) =
wl.Listener(*wlr.XdgToplevelDecorationV1).init(handleDestroy), wl.Listener(*wlr.XdgToplevelDecorationV1).init(handleDestroy),
request_mode: wl.Listener(*wlr.XdgToplevelDecorationV1) = request_mode: wl.Listener(*wlr.XdgToplevelDecorationV1) =
wl.Listener(*wlr.XdgToplevelDecorationV1).init(handleRequestMode), wl.Listener(*wlr.XdgToplevelDecorationV1).init(handleRequestMode),
// zig fmt: on
pub fn init(self: *Self, xdg_toplevel_decoration: *wlr.XdgToplevelDecorationV1) void { pub fn init(self: *Self, xdg_toplevel_decoration: *wlr.XdgToplevelDecorationV1) void {
self.* = .{ .xdg_toplevel_decoration = xdg_toplevel_decoration }; self.* = .{ .xdg_toplevel_decoration = xdg_toplevel_decoration };

View File

@ -29,10 +29,8 @@ const Server = @import("Server.zig");
xdg_decoration_manager: *wlr.XdgDecorationManagerV1, xdg_decoration_manager: *wlr.XdgDecorationManagerV1,
// zig fmt: off
new_toplevel_decoration: wl.Listener(*wlr.XdgToplevelDecorationV1) = new_toplevel_decoration: wl.Listener(*wlr.XdgToplevelDecorationV1) =
wl.Listener(*wlr.XdgToplevelDecorationV1).init(handleNewToplevelDecoration), wl.Listener(*wlr.XdgToplevelDecorationV1).init(handleNewToplevelDecoration),
// zig fmt: on
pub fn init(self: *Self) !void { pub fn init(self: *Self) !void {
self.* = .{ self.* = .{

View File

@ -47,7 +47,6 @@ seats: std.TailQueue(Seat) = .{},
exclusive_client: ?*wl.Client = null, exclusive_client: ?*wl.Client = null,
// zig fmt: off
inhibit_activate: wl.Listener(*wlr.InputInhibitManager) = inhibit_activate: wl.Listener(*wlr.InputInhibitManager) =
wl.Listener(*wlr.InputInhibitManager).init(handleInhibitActivate), wl.Listener(*wlr.InputInhibitManager).init(handleInhibitActivate),
inhibit_deactivate: wl.Listener(*wlr.InputInhibitManager) = inhibit_deactivate: wl.Listener(*wlr.InputInhibitManager) =
@ -58,7 +57,6 @@ new_virtual_pointer: wl.Listener(*wlr.VirtualPointerManagerV1.event.NewPointer)
wl.Listener(*wlr.VirtualPointerManagerV1.event.NewPointer).init(handleNewVirtualPointer), wl.Listener(*wlr.VirtualPointerManagerV1.event.NewPointer).init(handleNewVirtualPointer),
new_virtual_keyboard: wl.Listener(*wlr.VirtualKeyboardV1) = new_virtual_keyboard: wl.Listener(*wlr.VirtualKeyboardV1) =
wl.Listener(*wlr.VirtualKeyboardV1).init(handleNewVirtualKeyboard), wl.Listener(*wlr.VirtualKeyboardV1).init(handleNewVirtualKeyboard),
// zig fmt: on
pub fn init(self: *Self) !void { pub fn init(self: *Self) !void {
const seat_node = try util.gpa.create(std.TailQueue(Seat).Node); const seat_node = try util.gpa.create(std.TailQueue(Seat).Node);

View File

@ -33,12 +33,8 @@ const View = @import("View.zig");
constraint: *wlr.PointerConstraintV1, constraint: *wlr.PointerConstraintV1,
cursor: *Cursor, cursor: *Cursor,
// zig fmt: off destroy: wl.Listener(*wlr.PointerConstraintV1) = wl.Listener(*wlr.PointerConstraintV1).init(handleDestroy),
destroy: wl.Listener(*wlr.PointerConstraintV1) = set_region: wl.Listener(void) = wl.Listener(void).init(handleSetRegion),
wl.Listener(*wlr.PointerConstraintV1).init(handleDestroy),
set_region: wl.Listener(void) =
wl.Listener(void).init(handleSetRegion),
// zig fmt: on
pub fn init(self: *Self, constraint: *wlr.PointerConstraintV1) void { pub fn init(self: *Self, constraint: *wlr.PointerConstraintV1) void {
const seat = @intToPtr(*Seat, constraint.seat.data); const seat = @intToPtr(*Seat, constraint.seat.data);

View File

@ -46,7 +46,6 @@ new_output: wl.Listener(*wlr.Output) = wl.Listener(*wlr.Output).init(handleNewOu
output_layout: *wlr.OutputLayout, output_layout: *wlr.OutputLayout,
layout_change: wl.Listener(*wlr.OutputLayout) = wl.Listener(*wlr.OutputLayout).init(handleLayoutChange), layout_change: wl.Listener(*wlr.OutputLayout) = wl.Listener(*wlr.OutputLayout).init(handleLayoutChange),
// zig fmt: off
output_manager: *wlr.OutputManagerV1, output_manager: *wlr.OutputManagerV1,
manager_apply: wl.Listener(*wlr.OutputConfigurationV1) = manager_apply: wl.Listener(*wlr.OutputConfigurationV1) =
wl.Listener(*wlr.OutputConfigurationV1).init(handleManagerApply), wl.Listener(*wlr.OutputConfigurationV1).init(handleManagerApply),
@ -56,7 +55,6 @@ manager_test: wl.Listener(*wlr.OutputConfigurationV1) =
power_manager: *wlr.OutputPowerManagerV1, power_manager: *wlr.OutputPowerManagerV1,
power_manager_set_mode: wl.Listener(*wlr.OutputPowerManagerV1.event.SetMode) = power_manager_set_mode: wl.Listener(*wlr.OutputPowerManagerV1.event.SetMode) =
wl.Listener(*wlr.OutputPowerManagerV1.event.SetMode).init(handlePowerManagerSetMode), wl.Listener(*wlr.OutputPowerManagerV1.event.SetMode).init(handlePowerManagerSetMode),
// zig fmt: on
/// A list of all outputs /// A list of all outputs
all_outputs: std.TailQueue(*Output) = .{}, all_outputs: std.TailQueue(*Output) = .{},

View File

@ -74,7 +74,6 @@ focus_stack: ViewStack(*View) = .{},
/// List of status tracking objects relaying changes to this seat to clients. /// List of status tracking objects relaying changes to this seat to clients.
status_trackers: std.SinglyLinkedList(SeatStatus) = .{}, status_trackers: std.SinglyLinkedList(SeatStatus) = .{},
// zig fmt: off
request_set_selection: wl.Listener(*wlr.Seat.event.RequestSetSelection) = request_set_selection: wl.Listener(*wlr.Seat.event.RequestSetSelection) =
wl.Listener(*wlr.Seat.event.RequestSetSelection).init(handleRequestSetSelection), wl.Listener(*wlr.Seat.event.RequestSetSelection).init(handleRequestSetSelection),
request_start_drag: wl.Listener(*wlr.Seat.event.RequestStartDrag) = request_start_drag: wl.Listener(*wlr.Seat.event.RequestStartDrag) =
@ -82,7 +81,6 @@ request_start_drag: wl.Listener(*wlr.Seat.event.RequestStartDrag) =
start_drag: wl.Listener(*wlr.Drag) = wl.Listener(*wlr.Drag).init(handleStartDrag), start_drag: wl.Listener(*wlr.Drag) = wl.Listener(*wlr.Drag).init(handleStartDrag),
request_set_primary_selection: wl.Listener(*wlr.Seat.event.RequestSetPrimarySelection) = request_set_primary_selection: wl.Listener(*wlr.Seat.event.RequestSetPrimarySelection) =
wl.Listener(*wlr.Seat.event.RequestSetPrimarySelection).init(handleRequestSetPrimarySelection), wl.Listener(*wlr.Seat.event.RequestSetPrimarySelection).init(handleRequestSetPrimarySelection),
// zig fmt: on
pub fn init(self: *Self, name: [*:0]const u8) !void { pub fn init(self: *Self, name: [*:0]const u8) !void {
self.* = .{ self.* = .{

View File

@ -133,14 +133,12 @@ draw_borders: bool = true,
/// This is created when the view is mapped and destroyed with the view /// This is created when the view is mapped and destroyed with the view
foreign_toplevel_handle: ?*wlr.ForeignToplevelHandleV1 = null, foreign_toplevel_handle: ?*wlr.ForeignToplevelHandleV1 = null,
// zig fmt: off
foreign_activate: wl.Listener(*wlr.ForeignToplevelHandleV1.event.Activated) = foreign_activate: wl.Listener(*wlr.ForeignToplevelHandleV1.event.Activated) =
wl.Listener(*wlr.ForeignToplevelHandleV1.event.Activated).init(handleForeignActivate), wl.Listener(*wlr.ForeignToplevelHandleV1.event.Activated).init(handleForeignActivate),
foreign_fullscreen: wl.Listener(*wlr.ForeignToplevelHandleV1.event.Fullscreen) = foreign_fullscreen: wl.Listener(*wlr.ForeignToplevelHandleV1.event.Fullscreen) =
wl.Listener(*wlr.ForeignToplevelHandleV1.event.Fullscreen).init(handleForeignFullscreen), wl.Listener(*wlr.ForeignToplevelHandleV1.event.Fullscreen).init(handleForeignFullscreen),
foreign_close: wl.Listener(*wlr.ForeignToplevelHandleV1) = foreign_close: wl.Listener(*wlr.ForeignToplevelHandleV1) =
wl.Listener(*wlr.ForeignToplevelHandleV1).init(handleForeignClose), wl.Listener(*wlr.ForeignToplevelHandleV1).init(handleForeignClose),
// zig fmt: on
pub fn init(self: *Self, output: *Output, tags: u32, surface: anytype) void { pub fn init(self: *Self, output: *Output, tags: u32, surface: anytype) void {
self.* = .{ self.* = .{

View File

@ -48,14 +48,12 @@ new_subsurface: wl.Listener(*wlr.Subsurface) = wl.Listener(*wlr.Subsurface).init
// Listeners that are only active while the view is mapped // Listeners that are only active while the view is mapped
commit: wl.Listener(*wlr.Surface) = wl.Listener(*wlr.Surface).init(handleCommit), commit: wl.Listener(*wlr.Surface) = wl.Listener(*wlr.Surface).init(handleCommit),
// zig fmt: off
request_fullscreen: wl.Listener(*wlr.XdgToplevel.event.SetFullscreen) = request_fullscreen: wl.Listener(*wlr.XdgToplevel.event.SetFullscreen) =
wl.Listener(*wlr.XdgToplevel.event.SetFullscreen).init(handleRequestFullscreen), wl.Listener(*wlr.XdgToplevel.event.SetFullscreen).init(handleRequestFullscreen),
request_move: wl.Listener(*wlr.XdgToplevel.event.Move) = request_move: wl.Listener(*wlr.XdgToplevel.event.Move) =
wl.Listener(*wlr.XdgToplevel.event.Move).init(handleRequestMove), wl.Listener(*wlr.XdgToplevel.event.Move).init(handleRequestMove),
request_resize: wl.Listener(*wlr.XdgToplevel.event.Resize) = request_resize: wl.Listener(*wlr.XdgToplevel.event.Resize) =
wl.Listener(*wlr.XdgToplevel.event.Resize).init(handleRequestResize), wl.Listener(*wlr.XdgToplevel.event.Resize).init(handleRequestResize),
// zig fmt: on
set_title: wl.Listener(*wlr.XdgSurface) = wl.Listener(*wlr.XdgSurface).init(handleSetTitle), set_title: wl.Listener(*wlr.XdgSurface) = wl.Listener(*wlr.XdgSurface).init(handleSetTitle),
set_app_id: wl.Listener(*wlr.XdgSurface) = wl.Listener(*wlr.XdgSurface).init(handleSetAppId), set_app_id: wl.Listener(*wlr.XdgSurface) = wl.Listener(*wlr.XdgSurface).init(handleSetAppId),

View File

@ -30,10 +30,8 @@ const Box = @import("Box.zig");
xwayland_surface: *wlr.XwaylandSurface, xwayland_surface: *wlr.XwaylandSurface,
// Listeners that are always active over the view's lifetime // Listeners that are always active over the view's lifetime
// zig fmt: off
request_configure: wl.Listener(*wlr.XwaylandSurface.event.Configure) = request_configure: wl.Listener(*wlr.XwaylandSurface.event.Configure) =
wl.Listener(*wlr.XwaylandSurface.event.Configure).init(handleRequestConfigure), wl.Listener(*wlr.XwaylandSurface.event.Configure).init(handleRequestConfigure),
// zig fmt: on
destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy), destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy),
map: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleMap), map: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleMap),
unmap: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleUnmap), unmap: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleUnmap),

View File

@ -39,10 +39,8 @@ xwayland_surface: *wlr.XwaylandSurface,
destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy), destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy),
map: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleMap), map: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleMap),
unmap: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleUnmap), unmap: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleUnmap),
// zig fmt: off
request_configure: wl.Listener(*wlr.XwaylandSurface.event.Configure) = request_configure: wl.Listener(*wlr.XwaylandSurface.event.Configure) =
wl.Listener(*wlr.XwaylandSurface.event.Configure).init(handleRequestConfigure), wl.Listener(*wlr.XwaylandSurface.event.Configure).init(handleRequestConfigure),
// zig fmt: on
// Listeners that are only active while the view is mapped // Listeners that are only active while the view is mapped
commit: wl.Listener(*wlr.Surface) = wl.Listener(*wlr.Surface).init(handleCommit), commit: wl.Listener(*wlr.Surface) = wl.Listener(*wlr.Surface).init(handleCommit),