[gnome-shell/gnome-40] shellDBus: Properly return from D-Bus methods
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-40] shellDBus: Properly return from D-Bus methods
- Date: Fri, 9 Jul 2021 22:22:22 +0000 (UTC)
commit 021b0b1f56eaf87bf05e2f7c3d0680aca2d0e6f2
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jun 17 15:42:14 2021 +0200
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>
(cherry picked from commit 158920924df53198e85d997b33b6e05afb93f2e8)
js/ui/shellDBus.js | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 48e7bb5b89..6574cc5288 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -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() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]