summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/ui/shellDBus.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index a200a1bdd..c1d604fa2 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -101,9 +101,20 @@ var GnomeShell = new Lang.Class({
Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
},
- FocusApp(id) {
+ FocusAppAsync(params, invocation) {
+ let [id] = params;
+ let appSys = Shell.AppSystem.get_default();
+ if (appSys.lookup_app(id) == null) {
+ invocation.return_error_literal(
+ Gio.DBusError,
+ Gio.DBusError.FILE_NOT_FOUND,
+ `No application with ID ${id}`);
+ return;
+ }
+
this.ShowApplications();
Main.overview.viewSelector.appDisplay.selectApp(id);
+ invocation.return_value(null);
},
ShowApplications() {