shellDBus: Properly return from D-Bus methods

When implementing a D-Bus method synchronously, regular JS methods are
used. That is, whatever the method returns is passed as return value
to the method invocation.

However for asynchronous implementations, we need to explicitly return
a value to the invocation, otherwise the caller will wait until it times
out eventually.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1891>
This commit is contained in:
Florian Müllner 2021-06-17 15:42:14 +02:00 committed by Marge Bot
parent 6813e246cd
commit 158920924d

View File

@ -217,11 +217,13 @@ var GnomeShell = class {
let sender = invocation.get_sender();
let [dict] = params;
Main.osdMonitorLabeler.show(sender, dict);
invocation.return_value(null);
}
HideMonitorLabelsAsync(params, invocation) {
let sender = invocation.get_sender();
Main.osdMonitorLabeler.hide(sender);
invocation.return_value(null);
}
_checkOverviewVisibleChanged() {