Skip to content

wayland/text_input: send enter to new instance if focus already set - #2

Closed
bommbo wants to merge 3 commits into
emskin:emskin-patchesfrom
bommbo:emskin-patches
Closed

bommbo wants to merge 3 commits into
emskin:emskin-patchesfrom
bommbo:emskin-patches

Conversation

@bommbo

@bommbo bommbo commented Apr 19, 2026

Copy link
Copy Markdown

When a client creates a text_input object after keyboard focus has already been granted, the new instance never received an enter event, causing all subsequent text_input requests to be discarded.

Fix by sending enter immediately in add_instance() if a matching focus is already set.

Description

Checklist

When a client creates a text_input object after keyboard focus has
already been granted, the new instance never received an enter event,
causing all subsequent text_input requests to be discarded.

Fix by sending enter immediately in add_instance() if a matching
focus is already set.
@loyalpartner

Copy link
Copy Markdown
Collaborator

代码format 还是有问题, 提交前 先 cargo format --check 下

@bommbo

bommbo commented Apr 19, 2026

Copy link
Copy Markdown
Author

代码format 还是有问题, 提交前 先 cargo format --check 下

改完本地过了,貌似卡其他地方了。

@loyalpartner

Copy link
Copy Markdown
Collaborator

代码format 还是有问题, 提交前 先 cargo format --check 下

改完本地过了,貌似卡其他地方了。

只要提交的这部分代码没问题, 就行, 这个我暂时不合并,你那边 sway 测试没问题了, 我再合进来

…ance exists

When a client creates a text_input object after keyboard focus has
already been granted, the new instance never received an enter event,
causing all subsequent text_input requests to be discarded.

However, blindly sending enter on every new instance breaks compositors
(e.g. sway) where the normal enter flow has already been handled.

Fix by only sending enter if no existing instance from the same client
has an active serial (serial > 0 indicates the enter→enable→commit
flow has already completed normally).
@bommbo bommbo closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants