quickSettings: Add background apps menu

Sandboxed apps that run without a window are detected by the new
background monitoring service, introduced by xdg-desktop-portal.

We have an opportunity to improve the predictability of the desktop
and ensure that application state in transparently reported to users
by showing these apps, and allowing them to closed.

Add a new background apps menu to the quick settings, that is always
added at the bottom of the popover, and has a slightly custom, flat
style applied to it.

Show background-running apps in this menu, and allow closing them
by first attempting to execute the 'quit' action through D-Bus, and
if that fails, sending SIGKILL to the process.

See https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2624>
This commit is contained in:
Georges Basile Stavracas Neto
2023-02-02 15:58:43 -03:00
committed by Marge Bot
parent 055694de9d
commit 7604dd1103
9 changed files with 324 additions and 0 deletions

View File

@ -366,6 +366,7 @@ class QuickSettings extends PanelMenu.Button {
this._rfkill = new imports.ui.status.rfkill.Indicator();
this._autoRotate = new imports.ui.status.autoRotate.Indicator();
this._unsafeMode = new UnsafeModeIndicator();
this._backgroundApps = new imports.ui.status.backgroundApps.Indicator();
this._indicators.add_child(this._brightness);
this._indicators.add_child(this._remoteAccess);
@ -401,6 +402,8 @@ class QuickSettings extends PanelMenu.Button {
this._addItems(this._rfkill.quickSettingsItems);
this._addItems(this._autoRotate.quickSettingsItems);
this._addItems(this._unsafeMode.quickSettingsItems);
this._addItems(this._backgroundApps.quickSettingsItems, N_QUICK_SETTINGS_COLUMNS);
}
_addItems(items, colSpan = 1) {