fix: reset hover on focus_out events
This commit is contained in:
parent
4cbd8fbde3
commit
1cf22db498
1 changed files with 9 additions and 2 deletions
|
|
@ -517,11 +517,18 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) !void {
|
|||
if (try self.send_widgets(from, m))
|
||||
return;
|
||||
|
||||
if (try m.match(.{"focus_in"}))
|
||||
if (try m.match(.{"focus_in"})) {
|
||||
std.log.debug("focus_in", .{});
|
||||
return;
|
||||
}
|
||||
|
||||
if (try m.match(.{"focus_out"}))
|
||||
if (try m.match(.{"focus_out"})) {
|
||||
std.log.debug("focus_out", .{});
|
||||
self.clear_hover_focus(@src()) catch {};
|
||||
self.last_hover_x = -1;
|
||||
self.last_hover_y = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (try m.match(.{ "exit", tp.more })) {
|
||||
if (try m.match(.{ tp.string, "normal" }) or
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue