diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-03-29 15:58:04 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-03-29 15:58:04 +0200 |
| commit | f5304237b58c61cf2eb023d8a4c91d97c8808d33 (patch) | |
| tree | dd2190a3e88cc97b9e8075c8babcad8f7257a77a /src/view.zig | |
| parent | 9d0a41c0d2d17783e16861cce6313ebc5c713252 (diff) | |
| download | river-f5304237b58c61cf2eb023d8a4c91d97c8808d33.tar.gz river-f5304237b58c61cf2eb023d8a4c91d97c8808d33.tar.xz | |
Pass self as immutable where possible
Diffstat (limited to 'src/view.zig')
| -rw-r--r-- | src/view.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view.zig b/src/view.zig index 62f5b60..55f198b 100644 --- a/src/view.zig +++ b/src/view.zig @@ -69,7 +69,7 @@ pub const View = struct { // c.wl_signal_add(&toplevel.events.request_resize, &view.request_resize); } - pub fn needsConfigure(self: *const Self) bool { + pub fn needsConfigure(self: Self) bool { return self.pending_state.width != self.current_state.width or self.pending_state.height != self.current_state.height; } @@ -82,7 +82,7 @@ pub const View = struct { ); } - pub fn sendFrameDone(self: *Self) void { + pub fn sendFrameDone(self: Self) void { var now: c.struct_timespec = undefined; _ = c.clock_gettime(c.CLOCK_MONOTONIC, &now); c.wlr_surface_send_frame_done(self.wlr_xdg_surface.surface, &now); @@ -211,7 +211,7 @@ pub const View = struct { ); } - fn isAt(self: *Self, lx: f64, ly: f64, surface: *?*c.wlr_surface, sx: *f64, sy: *f64) bool { + fn isAt(self: Self, lx: f64, ly: f64, surface: *?*c.wlr_surface, sx: *f64, sy: *f64) bool { // XDG toplevels may have nested surfaces, such as popup windows for context // menus or tooltips. This function tests if any of those are underneath the // coordinates lx and ly (in output Layout Coordinates). If so, it sets the |
