Repository navigation
fix(linux-grid): ask about cell edits on close and stop the close hang - #3438
Merged
Merged
Conversation
GTK 4.22 walks up from the old focus after a focus change and loops forever once the inline field has left its cell, so a field that lost the focus stays hidden in the cell until its next edit. A tab close also moves the focus out of the page first: GTK 4.22 leaks a focus that is hidden and then unparented in one go (fixed in 4.24).
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On GTK 4.22, moving the focus away from a cell being edited froze the app: another cell, a button, or closing its tab. Closing the window with a half-typed value dropped it without a prompt. A tab closed with the focus inside, when the next tab took none, stayed in memory with its session.
Cause: the inline editor removed its text field from the cell during the focus change, and GTK 4.22 loops forever walking up from a focus widget with no parent. Separately, GTK 4.22 leaks a focused widget that is hidden and then unparented. GTK 4.24 fixes that one.
Change
Verified
Four
#[gtk4::test]cases fail before the fix on GTK 4.22.4 and pass after: two aborted on the critical, two timed out. The full gtk suite passes, and fmt and both clippy runs are clean.