fix: add support for kitty mouse leave events

This prevents reporting kitty mouse leave events as spurious mouse clicks.
This commit is contained in:
CJ van den Berg 2025-08-18 15:14:50 +02:00
parent d53a24a1d2
commit 9d127e4cc3
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 8 additions and 2 deletions

View file

@ -323,6 +323,9 @@ pub fn process_renderer_event(self: *Self, msg: []const u8) Error!void {
})),
};
},
.mouse_leave => {
if (self.dispatch_event) |f| f(self.handler_ctx, try self.fmtmsg(.{"mouse_leave"}));
},
.focus_in => {
if (self.dispatch_event) |f| f(self.handler_ctx, try self.fmtmsg(.{"focus_in"}));
},

View file

@ -389,6 +389,9 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) !void {
return;
}
if (try m.match(.{"mouse_leave"}))
return;
if (try m.match(.{"focus_in"}))
return;