TextInput: remove pending_focused_surface

This state doesn't need to exist, just get the focus from the Seat.
This commit is contained in:
Isaac Freund
2023-12-31 13:32:59 -06:00
parent 55ed16efd1
commit 49defcfb7a
4 changed files with 16 additions and 57 deletions

View File

@ -196,10 +196,8 @@ fn handleNewInputMethod(
log.debug("new input method on seat {s}", .{relay.seat.wlr_seat.name});
const text_input = relay.getFocusableTextInput() orelse return;
if (text_input.pending_focused_surface) |surface| {
text_input.wlr_text_input.sendEnter(surface);
text_input.setPendingFocusedSurface(null);
if (seat.focused.surface()) |surface| {
relay.setSurfaceFocus(surface);
}
}