main, util: Notify systemd once we are fully initialised

If graphical applications want to start from systemd units, they need to
start after we're properly ready to display them. This is particularly
important under X where `_GTK_FRAME_EXTENTS` and other xprops are needed
to have the right theming.

We're doing this in an idle callback so that the dynamic starting of
`gnome-session-x11-service.target` (which launches `gsd-xsettings`) as
the result of a signal emission happens before us signalling we're ready
for later things to start.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/750
This commit is contained in:
Iain Lane
2019-10-04 12:11:06 +01:00
committed by Jonas Ådahl
parent 9e8b97d474
commit 085531b43d
4 changed files with 23 additions and 12 deletions

View File

@ -229,7 +229,11 @@ function _initializeUI() {
EndSessionDialog.init();
// We're ready for the session manager to move to the next phase
Meta.register_with_session();
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
Shell.util_sd_notify();
Meta.register_with_session();
return GLib.SOURCE_REMOVE;
});
_startDate = new Date();