Skip to content

GridView: Create dummy grids only when no apps to populate - #711

Merged
danirabbit merged 2 commits into
masterfrom
ryonakano/no-create-dummy-first
Aug 11, 2026
Merged

GridView: Create dummy grids only when no apps to populate#711
danirabbit merged 2 commits into
masterfrom
ryonakano/no-create-dummy-first

Conversation

@ryonakano

Copy link
Copy Markdown
Member

Refactoring as a GTK 4 prep. As requested in #710 (comment)

Current approach in master

  1. add_new_grid (): Create dummy grids for all seats
  2. populate (): Overwrite it with AppButton

Problem

The above 2. won't work as expected in GTK 4 as I wrote in #710:

  • 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

New approach in this PR

  1. populate_page (): Create dummy grids only when no more apps

Note: link_args: ['-lm'], is added to the meson.build to use Math.ceil () as written in the valadoc

Checklists

  • Confirmed Applications Menu shows all apps in the grid as before

@ryonakano
ryonakano requested a review from a team August 11, 2026 12:42
Comment thread src/meson.build Outdated
@danirabbit
danirabbit enabled auto-merge (squash) August 11, 2026 16:35
@danirabbit
danirabbit merged commit 8b3823d into master Aug 11, 2026
4 checks passed
@danirabbit
danirabbit deleted the ryonakano/no-create-dummy-first branch August 11, 2026 16:35
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.

3 participants