mirror of
https://github.com/elementary/gala.git
synced 2024-12-18 06:41:36 +03:00
Wayland: start gnome-session-x11-services-ready.target (#2140)
This commit is contained in:
parent
869996cd64
commit
24b05bb414
@ -148,8 +148,39 @@ namespace Gala {
|
||||
display.gl_video_memory_purged.connect (() => {
|
||||
Meta.Background.refresh_all ();
|
||||
});
|
||||
|
||||
#if WITH_SYSTEMD
|
||||
if (Meta.Util.is_wayland_compositor ()) {
|
||||
display.init_xserver.connect ((task) => {
|
||||
start_x11_services.begin (task);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if WITH_SYSTEMD
|
||||
private async void start_x11_services (GLib.Task task) {
|
||||
try {
|
||||
var session_bus = yield GLib.Bus.@get (GLib.BusType.SESSION);
|
||||
yield session_bus.call (
|
||||
"org.freedesktop.systemd1",
|
||||
"/org/freedesktop/systemd1",
|
||||
"org.freedesktop.systemd1.Manager",
|
||||
"StartUnit",
|
||||
new GLib.Variant ("(ss)", "gnome-session-x11-services-ready.target", "fail"),
|
||||
new GLib.VariantType ("(o)"),
|
||||
GLib.DBusCallFlags.NONE,
|
||||
-1
|
||||
);
|
||||
} catch (Error e) {
|
||||
critical (e.message);
|
||||
} finally {
|
||||
task.return_boolean (true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private void show_stage () {
|
||||
unowned Meta.Display display = get_display ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user