Skip to content

Fix font size entry not accepting typed input in Add Text dialog#57

Closed
Copilot wants to merge 2 commits into
trunkfrom
copilot/fix-font-size-editing
Closed

Fix font size entry not accepting typed input in Add Text dialog#57
Copilot wants to merge 2 commits into
trunkfrom
copilot/fix-font-size-editing

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown

The font size field in the Add Text dialog silently dropped typed characters on Linux/X11, making it impossible to change the value via keyboard.

Root Cause

The root cause is still under investigation. The initial hypothesis — that Entry::onProcessMessage calling she::set_input_rect({})SDL_StopTextInput() on kFocusLeaveMessage caused an XIM reinitialisation delay — did not fully resolve the issue. Further comparison between the trunk and ls-develop branches is needed to identify which change introduced the regression.

Fix

Investigation is ongoing. The current change removes she::set_input_rect({}) from kFocusLeaveMessage in src/ui/entry.cpp, but this alone does not solve the problem.

Remove she::set_input_rect({}) call from Entry kFocusLeaveMessage
handler. On Linux/X11, calling SDL_StopTextInput() followed immediately
by SDL_StartTextInput() (when focus moves from one Entry to another)
causes SDL_TEXTINPUT events to not fire reliably for the first keypress.
This meant unicodeChar stayed 0, so InsertChar was never triggered and
typed characters were silently dropped.

By not stopping SDL text input on focus leave, text input remains active
when transitioning between Entry widgets, ensuring SDL_TEXTINPUT fires
correctly and typed characters are properly inserted.

Fixes #56
Copilot AI changed the title [WIP] Fix font size editing in Add Text menu Fix font size entry not accepting typed input in Add Text dialog Jun 15, 2026
Copilot AI requested a review from Nidrax June 15, 2026 08:35
@Nidrax

Nidrax commented Jun 15, 2026

Copy link
Copy Markdown
Member

@copilot Nice try, but it does not solve the issue at all. Have you compared the changed files between the trunk and ls-develop branches? I skimmed over them, but I can't say what change introduce the issue, since they all seem unrelated.

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