Skip to content

Gtk: Preserve child focus for bubbled mouse events - #3130

Open
Descolada wants to merge 1 commit into
picoe:developfrom
keysharp-org:upstream/gtk-bubbled-focus
Open

Descolada wants to merge 1 commit into
picoe:developfrom
keysharp-org:upstream/gtk-bubbled-focus

Conversation

@Descolada

@Descolada Descolada commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

A mouse event from a TextArea inside a TabControl can bubble to the GTK Notebook handler. Its automatic focus grab then moves focus to the Notebook, so subsequent typing no longer reaches the TextArea. It also overrides a MouseDown handler that focuses another descendant.

Preserve focus when both the original event widget and the focused widget are descendants of the receiving control. Direct container clicks and focus outside the subtree retain the existing focus behavior.

Keep descendant focus when a mouse event originated from a descendant,
instead of moving keyboard focus to the receiving container. Continue to
focus the container for direct clicks or when focus is outside its subtree.
@Descolada
Descolada marked this pull request as ready for review October 27, 2026 12:31
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