Skip to content

Address TODOs in GTK 4 porting - #710

Merged
danirabbit merged 3 commits into
danirabbit/gtk4from
ryonakano/gtk4-followup
Aug 11, 2026
Merged

Address TODOs in GTK 4 porting#710
danirabbit merged 3 commits into
danirabbit/gtk4from
ryonakano/gtk4-followup

Conversation

@ryonakano

@ryonakano ryonakano commented Aug 9, 2026

Copy link
Copy Markdown
Member

Addresses TODOs in #645

Changes Summary

  • GridView: Remove existing fake grids before adding AppButton Addressed in GridView: Create dummy grids only when no apps to populate #711 as suggested
    • get_widget_at() called in focused_column and focused_row properties returns Gtk.Grid instances instead of AppButton ones, resulting keyboard navigation does not switch focused app entries
  • Replace focus_in_event with Gtk.EventControllerFocus

Issues I found with this branch

I found the following 2 issues with this branch but I don't plan to fix them within the scope of this PR because they both would require more work and investigation.

1. Focus on AppButtons are stolen in a few seconds after first keyboard navigation

Screencast.From.2026-08-09.15-28-39.mp4

But this also happens with other indicators, so I suppose this would be an issue of Wingpanel itself:

Screencast.From.2026-08-09.15-27-22.mp4

2. Dnd app icons causes the entire wingpanel crashes

Screencast.From.2026-08-09.15-30-40.mp4

I suspect this is because the popover (display widget) of Applications Menu would be freed before DnD finishes and would be causing null pointer access, because it gets unparented by PopoverManager of Wingpanel itself when the popover is requested to be closed1. And Application Menu surely requests to close the popover when starting DnD23.

I confirmed commenting out the above popover.unparent (); in Wingpanel resolves this issue but we need to unparent the popover anyways at some point, right? So probably we might want to keep the popover open while DnD.

Footnotes

  1. https://github.com/elementary/wingpanel/blob/acf9a51a8d1de4e136bd72c523099ef650856d84/src/Services/PopoverManager.vala#L76

  2. https://github.com/elementary/applications-menu/blob/320297fb25ab8aa60d768eee10a5531ca495308d/src/Widgets/AppButton.vala#L118-L130

  3. https://github.com/elementary/applications-menu/blob/320297fb25ab8aa60d768eee10a5531ca495308d/src/Views/GridView.vala#L86

get_widget_at() called in focused_column and focused_row properties returns
Gtk.Grid instances instead of AppButton ones, resulting keyboard navigation does
not switch focused app entries.
@ryonakano
ryonakano requested a review from danirabbit August 9, 2026 06:40
Comment thread src/Views/GridView.vala Outdated
@danirabbit
danirabbit marked this pull request as ready for review August 11, 2026 16:41
@danirabbit
danirabbit merged commit 1a8b931 into danirabbit/gtk4 Aug 11, 2026
2 of 4 checks passed
@danirabbit
danirabbit deleted the ryonakano/gtk4-followup branch August 11, 2026 16:41
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.

2 participants