aboutsummaryrefslogtreecommitdiff
path: root/src/wl/output
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-08-29 18:21:48 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2025-08-29 18:21:48 +0200
commit4feb8c7dab2b0a3492b8248ee12c3f0a475106f1 (patch)
treef89a6389e24ab362cbdb21e1dbd4f96b404472fd /src/wl/output
parented0ec55697b11fa54ff661bc6c250398a096f85a (diff)
Use wayland.Context instead of *const wayland.Context
Diffstat (limited to 'src/wl/output')
-rw-r--r--src/wl/output/root.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wl/output/root.zig b/src/wl/output/root.zig
index f4ca36d..61c1798 100644
--- a/src/wl/output/root.zig
+++ b/src/wl/output/root.zig
@@ -38,7 +38,7 @@ handle: wayland.Object.Ref,
pub fn init(
self: *Self,
- ctx: *const wayland.Context,
+ ctx: wayland.Context,
) !void {
self.* = .{
.handle = try ctx.display.registry.add_object(
@@ -58,7 +58,7 @@ pub const handler: wl.Registry.GlobalHandler = .{
.handler = register,
};
-fn register(ctx: *const wayland.Context) ?wayland.Object.Ref {
+fn register(ctx: wayland.Context) ?wayland.Object.Ref {
const output = ctx.allocator.create(Self) catch return null;
output.init(ctx) catch return null;
@@ -68,7 +68,7 @@ fn register(ctx: *const wayland.Context) ?wayland.Object.Ref {
fn geometry(
self: *Self,
- ctx: *const wayland.Context,
+ ctx: wayland.Context,
x: u32,
y: u32,
physical_width: u32,
@@ -93,7 +93,7 @@ fn geometry(
fn mode(
self: *Self,
- ctx: *const wayland.Context,
+ ctx: wayland.Context,
flags: Mode.Kind,
width: u32,
height: u32,
@@ -108,7 +108,7 @@ fn mode(
};
}
-fn done(self: *Self, ctx: *const wayland.Context) void {
+fn done(self: *Self, ctx: wayland.Context) void {
if (self.info) |info| {
ctx.allocator.free(info.name);
ctx.allocator.free(info.description);
@@ -117,17 +117,17 @@ fn done(self: *Self, ctx: *const wayland.Context) void {
self.info = self.staging;
}
-fn scale(self: *Self, ctx: *const wayland.Context, factor: u32) void {
+fn scale(self: *Self, ctx: wayland.Context, factor: u32) void {
_ = ctx;
self.staging.scale = factor;
}
-fn name(self: *Self, ctx: *const wayland.Context, n: []const u8) !void {
+fn name(self: *Self, ctx: wayland.Context, n: []const u8) !void {
self.staging.name = try ctx.allocator.alloc(u8, n.len);
@memcpy(@constCast(self.staging.name), n);
}
-fn description(self: *Self, ctx: *const wayland.Context, d: []const u8) !void {
+fn description(self: *Self, ctx: wayland.Context, d: []const u8) !void {
self.staging.description = try ctx.allocator.alloc(u8, d.len);
@memcpy(@constCast(self.staging.description), d);
}