From f861c0441f16083d145da4f3988529bd77eca8f8 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 25 Sep 2025 07:34:36 +0000 Subject: [PATCH] import OL gnome-shell- --- ...tionally-allow-restart-shutdown-on-l.patch | 64 +++++++++++++++++++ gnome-shell.spec | 6 +- sources | 2 +- 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 0001-systemActions-Optionally-allow-restart-shutdown-on-l.patch diff --git a/0001-systemActions-Optionally-allow-restart-shutdown-on-l.patch b/0001-systemActions-Optionally-allow-restart-shutdown-on-l.patch new file mode 100644 index 0000000..be85a3e --- /dev/null +++ b/0001-systemActions-Optionally-allow-restart-shutdown-on-l.patch @@ -0,0 +1,64 @@ +From 193b664c7daa2ea7707e8b7fba03afe07e2cbd2a Mon Sep 17 00:00:00 2001 +From: Joan Torres Lopez +Date: Tue, 15 Jul 2025 11:27:01 +0200 +Subject: [PATCH] systemActions: Optionally allow restart/shutdown on lock + screen + +Support the new 'restart-enabled' setting from 'org.gnome.desktop.screensaver' +to optionally allow restart/shutdown from the lock screen. + +Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1584 +Part-of: +--- + js/misc/systemActions.js | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js +index a027a8134..c24d254b4 100644 +--- a/js/misc/systemActions.js ++++ b/js/misc/systemActions.js +@@ -12,10 +12,12 @@ import * as Screenshot from '../ui/screenshot.js'; + + const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; + const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen'; ++const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver'; + const DISABLE_USER_SWITCH_KEY = 'disable-user-switching'; + const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen'; + const DISABLE_LOG_OUT_KEY = 'disable-log-out'; + const DISABLE_RESTART_KEY = 'disable-restart-buttons'; ++const RESTART_ENABLED_KEY = 'restart-enabled'; + const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out'; + + const POWER_OFF_ACTION_ID = 'power-off'; +@@ -153,6 +155,7 @@ const SystemActions = GObject.registerClass({ + this._loginScreenSettings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA}); + this._lockdownSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA}); + this._orientationSettings = new Gio.Settings({schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen'}); ++ this._screenSaverSettings = new Gio.Settings({schema_id: SCREENSAVER_SCHEMA}); + + this._session = new GnomeSession.SessionManager(); + this._loginManager = LoginManager.getLoginManager(); +@@ -182,6 +185,9 @@ const SystemActions = GObject.registerClass({ + this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`, + () => this._updateHaveShutdown()); + ++ this._screenSaverSettings.connect(`changed::${RESTART_ENABLED_KEY}`, ++ () => this._updateHaveShutdown()); ++ + this.forceUpdate(); + + this._orientationSettings.connect('changed::orientation-lock', () => { +@@ -347,7 +353,8 @@ const SystemActions = GObject.registerClass({ + } + + _updatePowerOff() { +- let disabled = Main.sessionMode.isLocked || ++ let disabled = (Main.sessionMode.isLocked && ++ !this._screenSaverSettings.get_boolean(RESTART_ENABLED_KEY)) || + (Main.sessionMode.isGreeter && + this._loginScreenSettings.get_boolean(DISABLE_RESTART_KEY)); + this._actions.get(POWER_OFF_ACTION_ID).available = this._canHavePowerOff && !disabled; +-- +2.49.0 + + diff --git a/gnome-shell.spec b/gnome-shell.spec index fccef0f..4baa034 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -2,7 +2,7 @@ ## (rpmautospec version 0.6.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 2; + release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -42,6 +42,7 @@ Patch: 0001-screenShield-unblank-when-inserting-smartcard.patch Patch: enforce-smartcard-at-unlock.patch Patch: disable-unlock-entry-until-question.patch Patch: gdm-support-banner-message-file.patch +Patch: 0001-systemActions-Optionally-allow-restart-shutdown-on-l.patch # Extensions Patch: 0001-extensionDownloader-Refuse-to-override-system-extens.patch @@ -287,6 +288,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.Porta %changelog ## START: Generated by rpmautospec +* Wed Sep 24 2025 Darren Archibald - 47.4-3 +- Allow restart/shutdown on lock screen + * Fri Feb 14 2025 Florian Müllner - 47.4-2 - data: Tweak app defaults diff --git a/sources b/sources index 6be8fbb..8f242ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -65a0dab1bdd6957e52c624fde21ff3fe1d189aa0d6e2a13035ab53ab51e82ff8a88d28a5308c77d4650d5e1b0f643be702ee767379c96a10308752924c79dd72 gnome-shell-47.4.tar.xz +SHA512 (gnome-shell-47.4.tar.xz) = 65a0dab1bdd6957e52c624fde21ff3fe1d189aa0d6e2a13035ab53ab51e82ff8a88d28a5308c77d4650d5e1b0f643be702ee767379c96a10308752924c79dd72