Bikeshed variable names

This commit is contained in:
Isaac Freund
2020-04-21 16:29:17 +02:00
parent 109a744007
commit 94760394b4
10 changed files with 125 additions and 129 deletions
+4 -8
View File
@@ -28,18 +28,14 @@ pub const DecorationManager = struct {
}
fn handleNewToplevelDecoration(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
const decoration_manager = @fieldParentPtr(
DecorationManager,
"listen_new_toplevel_decoration",
listener.?,
);
const self = @fieldParentPtr(Self, "listen_new_toplevel_decoration", listener.?);
const wlr_xdg_toplevel_decoration = @ptrCast(
*c.wlr_xdg_toplevel_decoration_v1,
@alignCast(@alignOf(*c.wlr_xdg_toplevel_decoration_v1), data),
);
const node = decoration_manager.decorations.allocateNode(decoration_manager.server.allocator) catch unreachable;
node.data.init(decoration_manager, wlr_xdg_toplevel_decoration);
decoration_manager.decorations.prepend(node);
const node = self.decorations.allocateNode(self.server.allocator) catch unreachable;
node.data.init(self, wlr_xdg_toplevel_decoration);
self.decorations.prepend(node);
}
};