fix: be more precise about tracking active state in scrollbar_v widget

This commit is contained in:
CJ van den Berg 2025-11-03 20:47:18 +01:00
parent 2d65864e74
commit 1fb3a8828a
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -68,17 +68,17 @@ pub fn receive(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool {
self.active = true; self.active = true;
self.move_to(y, ypx); self.move_to(y, ypx);
return true; return true;
} else if (try m.match(.{ "B", input.event.release, tp.more })) { } else if (try m.match(.{ "B", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.more })) {
self.active = false; self.active = false;
return true; return true;
} else if (try m.match(.{ "D", input.event.press, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.extract(&y), tp.any, tp.extract(&ypx) })) { } else if (try m.match(.{ "D", input.event.press, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.extract(&y), tp.any, tp.extract(&ypx) })) {
self.active = true; self.active = true;
self.move_to(y, ypx); self.move_to(y, ypx);
return true; return true;
} else if (try m.match(.{ "B", input.event.release, tp.more })) { } else if (try m.match(.{ "B", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.more })) {
self.active = false; self.active = false;
return true; return true;
} else if (try m.match(.{ "D", input.event.release, tp.more })) { } else if (try m.match(.{ "D", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.more })) {
self.active = false; self.active = false;
return true; return true;
} else if (try m.match(.{ "H", tp.extract(&self.hover) })) { } else if (try m.match(.{ "H", tp.extract(&self.hover) })) {