Repository navigation
Separate property focus from text edit focus - #993
Conversation
RobLoach
left a comment
There was a problem hiding this comment.
Looking pretty good. Couple questions.
There was a problem hiding this comment.
I appreciate the little text case here, but do we need it?
| active = ctx->active->popup.win->edit.active || ctx->active->popup.win->property.active; | ||
| else | ||
| active = ctx->active->edit.active; | ||
| active = ctx->active->edit.active || ctx->active->property.active; |
There was a problem hiding this comment.
Are there any other renderers where this happens?
|
Thanks! Removed the standalone repro demo in c3877b5 to keep the PR focused. I retained it for local validation: all 24 scenarios still pass as C89, C++11, and with AddressSanitizer/UndefinedBehaviorSanitizer. The focus mix-up originates in the shared property code. I checked the demo backends: only |
RobLoach
left a comment
There was a problem hiding this comment.
Looks fine to me, I'll leave this open for anyone else to review too.
Fixes #974.
Activating a property sets
win->edit.activewithout assigning a text-edit identity. On the next frame, the first or previously focused text edit can regain focus and consume the property's keyboard input.Keep property focus in
win->property, and have the SDL3 renderer request text input for either an active text edit or property, including popups. This preserves the SDL3 text-input behavior introduced in c4e370b without sharing widget focus. The generated header is rebuilt and the patch version is bumped as requested by the contribution guide.The standalone repro demo has been removed from the PR to keep the shipped change focused. Validation still uses the headless harness retained in the earlier commit, restored temporarily against the current source. It covers both widget orders, string and buffer text edits, all six property entry points, committing a value when focus moves, and returning to the property.
Validation on Linux, rerun for this follow-up:
make nukereproduces the checked-in header andsh -e .github/ci_compile_sources.shcompiles all 43 source files.The regression build retains two existing unused-function warnings. Other platform/backend demos and live OS IME behavior were not run locally. Upstream workflows currently require maintainer approval before execution.