endSessionDialog: Only show logout inhibiting apps
Apps that only inhibit other kinds of activity (like idle or suspend) don't need to be shown to user when they are logging out. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3119 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1424>
This commit is contained in:
@ -626,8 +626,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
}
|
||||
|
||||
let app = findAppFromInhibitor(inhibitor);
|
||||
const [flags] = app ? inhibitor.GetFlagsSync() : [0];
|
||||
|
||||
if (app) {
|
||||
if (app && flags & GnomeSession.InhibitFlags.LOGOUT) {
|
||||
let [description] = inhibitor.GetReasonSync();
|
||||
let listItem = new Dialog.ListSectionItem({
|
||||
icon_actor: app.create_icon_texture(_ITEM_ICON_SIZE),
|
||||
@ -636,7 +637,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
});
|
||||
this._applicationSection.list.add_child(listItem);
|
||||
} else {
|
||||
// inhibiting app is a service, not an application
|
||||
// inhibiting app is a service (not an application) or is not
|
||||
// inhibiting logout/shutdown
|
||||
this._applications.splice(this._applications.indexOf(inhibitor), 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user