Skip to content

[GTK4] Activate a popover shell when it is pressed - #3616

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-activate-popover-on-press
Sep 23, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-activate-popover-on-press

Conversation

@akurtakov

Copy link
Copy Markdown
Member

A press in a popover moves the keyboard focus into it, and the previous focus control gets FocusOut first. Since popovers are no longer made active on show, JFace disposed the Ctrl+hover link popup in that FocusOut, in the middle of GTK's focus change, and GTK then looped forever on gtk_widget_get_parent (NULL). Activate the shell in the capture phase, before the focus moves.

Assisted-by: Anthropic Claude Code (claude-opus-5-5[1m])

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Non-primary mouse presses can still trigger the unsafe focus transition without activating the shell.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Activates GTK4 popover-backed shells before focus transitions to prevent disposal during FocusOut.

Changes:

  • Adds a capture-phase click gesture to popover shells.
  • Marks eligible shells active when pressed.
File Description
Shell.java Adds early activation handling for GTK4 popovers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Test Results (linux)

  109 files  ±0    109 suites  ±0   15m 4s ⏱️ -6s
4 635 tests ±0  4 401 ✅ ±0  234 💤 ±0  0 ❌ ±0 
3 479 runs  ±0  3 390 ✅ ±0   89 💤 ±0  0 ❌ ±0 

Results for commit 9cee6eb. ± Comparison against base commit 7bfb7f3.

♻️ This comment has been updated with latest results.

A press in a popover moves the keyboard focus into it, and the previous
focus control gets FocusOut first. Since popovers are no longer made
active on show, JFace disposed the Ctrl+hover link popup in that
FocusOut, in the middle of GTK's focus change, and GTK then looped
forever on gtk_widget_get_parent (NULL). Activate the shell in the
capture phase, before the focus moves.

Assisted-by: Anthropic Claude Code (claude-opus-5-5[1m])

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused change correctly addresses activation ordering without consuming or disrupting downstream press handling.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@akurtakov akurtakov self-assigned this Sep 23, 2026
@akurtakov
akurtakov merged commit d8f8ecd into eclipse-platform:master Sep 23, 2026
18 checks passed
@akurtakov
akurtakov deleted the gtk4-activate-popover-on-press branch September 23, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants