Elektrine lite

← Feed

@wwarner@techhub.social

Post #1945991

2026-05-03 18:10 UTC

TIL that in many #GTK apps you do not want to make the `quit` action call the `quit` method of Gtk/AdwApplication because it is from Gio and will not destroy your widgets. #libadwaita #GNOME

Replies (2)

  • @wwarner@techhub.social 2026-05-03 19:02

    Also, `quit` will not be emitted if the user closes the window instead of Ctrl+Q. case in point: https://gitlab.gnome.org/GNOME/quadrapassel/-/commit/c4eb0bf179c27ed42e296b01f5a76d19c7c07ca4

    Open ##2765056

  • @ebassi@mastodon.social 2026-05-03 18:22

    @wwarner@techhub.social the quit() method is on the GApplication class, and it will raise a flag to return immediately from the (blocking) run() method. You can still destroy everything by releasing the reference on the application instance before returning to the OS at the end of your main function, but not everyone does it.

    Open ##2765061