fixup: fix(gutter): add missing abs to rel conversion in primary_click/_drag

This commit is contained in:
CJ van den Berg 2025-01-24 23:24:58 +01:00
parent 4848f2494f
commit 41b230d17f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -104,6 +104,10 @@ pub fn abs_yx_to_rel(self: Plane, y: c_int, x: c_int) struct { c_int, c_int } {
return .{ y - self.abs_y(), x - self.abs_x() };
}
pub fn abs_y_to_rel(self: Plane, y: c_int) c_int {
return y - self.abs_y();
}
pub fn rel_yx_to_abs(self: Plane, y: c_int, x: c_int) struct { c_int, c_int } {
return .{ self.abs_y() + y, self.abs_x() + x };
}