windowManager: Allow xwayland startup to complete without systemd

Since commit 0ecddafc20 gsd-xsettings startup has been made conditional
on the systemd user instance being available at runtime. While that is
correct, it means that completing xwayland startup is also conditional
now.

We always want xwayland startup to go ahead, so wait for the XSettings
plugin to appear on the bus when gsd-xsettings is launched by gnome-session
and complete the task immediately if startup fails.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1252
This commit is contained in:
Florian Müllner 2020-05-12 17:16:34 +02:00
parent e8ae2ea432
commit fde8519002

View File

@ -902,7 +902,9 @@ var WindowManager = class {
IBusManager.getIBusManager().restartDaemon(['--xim']);
try {
if (Shell.util_start_systemd_unit('gsd-xsettings.target', 'fail')) {
if (!Shell.util_start_systemd_unit('gsd-xsettings.target', 'fail'))
log('Not starting gsd-xsettings; waiting for gnome-session to do so');
/* Leave this watchdog timeout so don't block indefinitely here */
let timeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 5, () => {
Gio.DBus.session.unwatch_name(watchId);
@ -924,9 +926,9 @@ var WindowManager = class {
}
},
null);
}
} catch (e) {
log('Error starting gsd-xsettings: %s'.format(e.message));
task.return_boolean(true);
}
return true;