fix: forward focus_in/_out events to all mainview widgets

This commit is contained in:
CJ van den Berg 2026-02-02 17:18:36 +01:00
parent c9dc713537
commit 44356e5d30
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -499,12 +499,6 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) !void {
if (try m.match(.{"mouse_leave"})) if (try m.match(.{"mouse_leave"}))
return; return;
if (try m.match(.{"focus_in"}))
return;
if (try m.match(.{"focus_out"}))
return;
if (try m.match(.{ "K", tp.more })) if (try m.match(.{ "K", tp.more }))
return; return;
@ -514,6 +508,12 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) !void {
if (try self.send_widgets(from, m)) if (try self.send_widgets(from, m))
return; return;
if (try m.match(.{"focus_in"}))
return;
if (try m.match(.{"focus_out"}))
return;
if (try m.match(.{ "exit", tp.more })) { if (try m.match(.{ "exit", tp.more })) {
if (try m.match(.{ tp.string, "normal" }) or if (try m.match(.{ tp.string, "normal" }) or
try m.match(.{ tp.string, "timeout_error", 125, "Operation aborted." }) or try m.match(.{ tp.string, "timeout_error", 125, "Operation aborted." }) or