[gnome-shell] endSessionDialog: Don't error out if gnome-session hands us a dead inhibitor
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] endSessionDialog: Don't error out if gnome-session hands us a dead inhibitor
- Date: Thu, 22 Aug 2013 21:18:12 +0000 (UTC)
commit c44caa5c96befde25f09db11cd3c4625e4725cd7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Aug 22 16:14:14 2013 -0400
endSessionDialog: Don't error out if gnome-session hands us a dead inhibitor
Sometimes gnome-session hands us a bad object path for JIT inhibitors
it creates for XSMP clients. While this is a bug in gnome-session, we
shouldn't show an empty-looking dialog here.
https://bugzilla.gnome.org/show_bug.cgi?id=706612
js/ui/endSessionDialog.js | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 48ff151..9952593 100644
--- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js
@@ -118,7 +118,15 @@ const DialogContent = {
};
function findAppFromInhibitor(inhibitor) {
- let [desktopFile] = inhibitor.GetAppIdSync();
+ let desktopFile;
+ try {
+ [desktopFile] = inhibitor.GetAppIdSync();
+ } catch(e) {
+ // XXX -- sometimes JIT inhibitors generated by gnome-session
+ // get removed too soon. Don't fail in this case.
+ log('gnome-session gave us a dead inhibitor: %s'.format(inhibitor.get_object_path());
+ return null;
+ }
if (!GLib.str_has_suffix(desktopFile, '.desktop'))
desktopFile += '.desktop';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]