feat(gui): generate focus_in/_out events from wio app

This commit is contained in:
CJ van den Berg 2026-04-07 20:33:01 +02:00
parent 32ed60bc64
commit cf496c881c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -534,8 +534,14 @@ fn wioLoop() void {
const cp = pixelToCellPos(mouse_pos); const cp = pixelToCellPos(mouse_pos);
tui_pid.send(.{ "RDR", "B", @as(u8, 1), btn_id, cp.col, cp.row, cp.xoff, cp.yoff }) catch {}; tui_pid.send(.{ "RDR", "B", @as(u8, 1), btn_id, cp.col, cp.row, cp.xoff, cp.yoff }) catch {};
}, },
.focused => window.enableTextInput(.{}), .focused => {
.unfocused => window.disableTextInput(), window.enableTextInput(.{});
tui_pid.send(.{"focus_in"}) catch {};
},
.unfocused => {
window.disableTextInput();
tui_pid.send(.{"focus_out"}) catch {};
},
else => {}, else => {},
} }
} }