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

@ -24,14 +24,6 @@
#include "shell-perf-log.h"
#include "st.h"
#ifdef HAVE_SYSTEMD
#include <systemd/sd-daemon.h>
#else
/* So we don't need to add ifdef's everywhere */
#define sd_notify(u, m) do {} while (0)
#define sd_notifyf(u, m, ...) do {} while (0)
#endif
extern GType gnome_shell_plugin_get_type (void);
#define SHELL_DBUS_SERVICE "org.gnome.Shell"
@ -532,9 +524,6 @@ main (int argc, char **argv)
shell_init_debug (g_getenv ("SHELL_DEBUG"));
shell_dbus_init (meta_get_replace_current_wm ());
/* We only use NOTIFY_SOCKET exactly once; unset it so it doesn't remain in
* our environment. */
sd_notify (1, "READY=1");
shell_a11y_init ();
shell_perf_log_init ();
shell_introspection_init ();