Skip to content

fix(linux-grid): ask about cell edits on close and stop the close hang - #3438

Merged
datlechin merged 2 commits into
linuxfrom
fix/linux-close-tab-while-editing
Oct 16, 2026
Merged

datlechin merged 2 commits into
linuxfrom
fix/linux-close-tab-while-editing

Conversation

@datlechin

Copy link
Copy Markdown
Member

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

  • A field that lost the focus stays hidden in its cell until the next edit, instead of leaving mid focus change.
  • Closing a tab, closing the window, quitting or disconnecting first commits the open cell edit as Return does. The Save, Discard or Cancel prompt then covers it.
  • Before a focused tab closes, the next tab is selected so the focus moves out while the page is still whole.

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.

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).
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.

1 participant