Skip to content

[GTK4] Wire menubar drop-downs by menu model, not position - #3587

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-fix-menubar-popover-lookup
Sep 11, 2026
Merged

[GTK4] Wire menubar drop-downs by menu model, not position#3587
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-fix-menubar-popover-lookup

Conversation

@akurtakov

@akurtakov akurtakov commented Sep 11, 2026

Copy link
Copy Markdown
Member

Menu.connectDropDownMenuSignals paired the bar's child widgets with the item list positionally. It also runs from the model's "items-changed", i.e. in the middle of an item being created or disposed, when the two are out of step; a positional walk then wired a menu to its neighbour's popover, leaking the Menu and leaving submenus without their SWT.Show.

Locate each drop-down's popover by its menu model with findNestedPopoverForModel instead, and drop the now unused findGtkPopoverMenuChild.

Assisted-by: Anthropic Claude Code (claude-fable-5-1)

Menu.connectDropDownMenuSignals paired the bar's child widgets with the
item list positionally. It also runs from the model's "items-changed",
i.e. in the middle of an item being created or disposed, when the two
are out of step; a positional walk then wired a menu to its neighbour's
popover, leaking the Menu and leaving submenus without their SWT.Show.

Locate each drop-down's popover by its menu model with
findNestedPopoverForModel instead, and drop the now unused
findGtkPopoverMenuChild.

Assisted-by: Anthropic Claude Code (claude-fable-5-1)
@akurtakov
akurtakov force-pushed the gtk4-fix-menubar-popover-lookup branch from bdb7322 to ef0af4a Compare September 11, 2026 20:59

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.

🟡 Changes recommended

The timing-sensitive GTK4 regression needs automated coverage for mapped menu mutation and disposal.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates GTK4 menu-bar signal wiring to match popovers by menu model instead of child position.

Changes:

  • Finds each submenu popover through its model.
  • Removes the obsolete positional lookup helper.
  • Prevents neighboring menus from receiving incorrect signal wiring.
File summaries
File Description
Menu.java Reworks GTK4 drop-down popover discovery and removes unused traversal code.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (linux)

  109 files  ±0    109 suites  ±0   14m 35s ⏱️ -33s
4 626 tests ±0  4 393 ✅ ±0  233 💤 ±0  0 ❌ ±0 
3 452 runs  ±0  3 368 ✅ ±0   84 💤 ±0  0 ❌ ±0 

Results for commit ef0af4a. ± Comparison against base commit f9faaf1.

@akurtakov
akurtakov merged commit af630a9 into eclipse-platform:master Sep 11, 2026
19 checks passed
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