aboutsummaryrefslogtreecommitdiff
path: root/src/output.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-03-24 20:48:38 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2020-03-24 20:48:38 +0100
commit46fe1baa96d8d0f80dc9d5441e2c610a873081d8 (patch)
treec3b6cc56928956efc95089c5eb74ee2a3cd845b7 /src/output.zig
parent45c7e27935497f3702f2278a6514181ef988f6fa (diff)
downloadriver-46fe1baa96d8d0f80dc9d5441e2c610a873081d8.tar.gz
river-46fe1baa96d8d0f80dc9d5441e2c610a873081d8.tar.xz
Use Self = @This() in all structs
This seems to be the idiomatic way to do things.
Diffstat (limited to 'src/output.zig')
-rw-r--r--src/output.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/output.zig b/src/output.zig
index f0f1118..f91fd6b 100644
--- a/src/output.zig
+++ b/src/output.zig
@@ -12,11 +12,13 @@ const RenderData = struct {
};
pub const Output = struct {
+ const Self = @This();
+
server: *Server,
wlr_output: *c.wlr_output,
listen_frame: c.wl_listener,
- pub fn init(self: *@This(), server: *Server, wlr_output: *c.wlr_output) !void {
+ pub fn init(self: *Self, server: *Server, wlr_output: *c.wlr_output) !void {
// Some backends don't have modes. DRM+KMS does, and we need to set a mode
// before we can use the output. The mode is a tuple of (width, height,
// refresh rate), and each monitor supports only a specific set of modes. We