
Prior to commit 7bd98f3f5fb7e0d1220646b8a4ee7073534a8e8f animation onComplete handlers always occured at least after one main loop iteration. Now, if animations are disabled, they can get invoked immediately. That breaks the endSessionDialog button handler, which calls close before setting up the "closed" signal handler. This commit fixes the handler to get set up first. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2677>