Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Files Files
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 478
    • Issues 478
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • FilesFiles
  • Issues
  • #1993
Closed
Open
Created Oct 03, 2021 by António Fernandes@antoniof🐚Maintainer

Reimplement interactive tests without gtk_main()

gtk_main() is gone in GTK 4, but the tests in the tests/interactive/ directory currently rely on it.

GTK 4 removes the gtk_main_* family of APIs. The recommended replacement is GtkApplication, but you can also iterate the GLib main loop directly, using GMainContext APIs. The replacement for gtk_events_pending() is g_main_context_pending(), the replacement for gtk_main_iteration() is g_main_context_iteration().

In GTK 4, you can use this replacement that will iterate the default main loop until all windows have been closed:

while (g_list_model_get_n_items (gtk_window_get_toplevels ()) > 0)
  g_main_context_iteration (NULL, TRUE);

In order to port to GTK 4, we must either solve this issue soon or disable the interactive tests and fix this later.

Edited Oct 03, 2021 by António Fernandes
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking