fix: missing mouse events in row/column 0

This commit is contained in:
CJ van den Berg 2024-12-09 18:30:12 +01:00
parent cc14934aa5
commit 03490a7f00
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -551,7 +551,7 @@ fn send_mouse_drag(self: *Self, y: c_int, x: c_int, from: tp.pid_ref, m: tp.mess
fn update_hover(self: *Self, y: c_int, x: c_int) !?*Widget {
self.last_hover_y = y;
self.last_hover_x = x;
if (y > 0 and x > 0) if (self.find_coord_widget(@intCast(y), @intCast(x))) |w| {
if (y >= 0 and x >= 0) if (self.find_coord_widget(@intCast(y), @intCast(x))) |w| {
if (if (self.hover_focus) |h| h != w else true) {
var buf: [256]u8 = undefined;
if (self.hover_focus) |h| {