gnome-shell/gnome-shell-fate324570-Make-GDM-background-image-configurable.patch
Dominique Leuenberger 0561dc4828 - Rebase SLE patches:
+ gnome-shell-gdm-login-applet.patch
  + gnome-shell-domain.patch
  + gnome-shell-fate324570-Make-GDM-background-image-configurable.patch
  + gnome-shell-jsc#SLE-16051-Input-method-recommendation.patch
- Comment out gs-fate318433-prevent-same-account-multi-logins.patch
  Needs to be removed or rebased.

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=584
2024-08-09 07:58:14 +00:00

129 lines
4.7 KiB
Diff

diff -urp gnome-shell-46.4.orig/data/gnome-shell-theme.gresource.xml gnome-shell-46.4/data/gnome-shell-theme.gresource.xml
--- gnome-shell-46.4.orig/data/gnome-shell-theme.gresource.xml 2024-08-08 13:52:20.487980529 -0500
+++ gnome-shell-46.4/data/gnome-shell-theme.gresource.xml 2024-08-08 15:23:52.451210823 -0500
@@ -13,6 +13,7 @@
<file>gnome-shell-light.css</file>
<file>gnome-shell-high-contrast.css</file>
<file>gnome-shell-start.svg</file>
+ <file>noise-texture.png</file>
<file>pad-osd.css</file>
<file>process-working-light.svg</file>
<file>process-working-dark.svg</file>
diff -urp gnome-shell-46.4.orig/js/ui/screenShield.js gnome-shell-46.4/js/ui/screenShield.js
--- gnome-shell-46.4.orig/js/ui/screenShield.js 2024-08-08 13:52:20.514647416 -0500
+++ gnome-shell-46.4/js/ui/screenShield.js 2024-08-08 15:49:50.656867413 -0500
@@ -11,6 +11,7 @@ import St from 'gi://St';
import * as Signals from '../misc/signals.js';
+import * as Background from './background.js';
import * as GnomeSession from '../misc/gnomeSession.js';
import * as OVirt from '../gdm/oVirt.js';
import * as LoginManager from '../misc/loginManager.js';
@@ -23,6 +24,8 @@ import * as SmartcardManager from '../mi
import {adjustAnimationTime} from '../misc/animationUtils.js';
+const LOCKDIALOG_BACKGROUND_SCHEMA = 'org.gnome.desktop.background.lockdialog';
+
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
const LOCK_ENABLED_KEY = 'lock-enabled';
const LOCK_DELAY_KEY = 'lock-delay';
@@ -32,6 +35,9 @@ const DISABLE_LOCK_KEY = 'disable-lock-s
const LOCKED_STATE_STR = 'screenShield.locked';
+const BLUR_BRIGHTNESS = 0.55;
+const BLUR_SIGMA = 60;
+
// ScreenShield animation time
// - STANDARD_FADE_TIME is used when the session goes idle
// - MANUAL_FADE_TIME is used for lowering the shield when asked by the user,
@@ -74,6 +80,16 @@ export class ScreenShield extends Signal
name: 'lockDialogGroup',
});
+ // Add background for this._lockDialogGroup
+ this._bgLockDialogGroup = new Clutter.Actor();
+ this._lockDialogGroup.add_child(this._bgLockDialogGroup);
+ this._lockDialogGroup.set_child_below_sibling(this._bgLockDialogGroup, null);
+ this._bgManagersLockDialogGroup = [];
+
+ this._updateBgLockDialogGroup();
+ this._monitorsChangedId =
+ Main.layoutManager.connect('monitors-changed', this._updateBgLockDialogGroup.bind(this));
+
this.actor.add_child(this._lockScreenGroup);
this.actor.add_child(this._lockDialogGroup);
@@ -142,6 +158,15 @@ export class ScreenShield extends Signal
this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
this._syncInhibitor();
+
+ this.connect('destroy', this._onDestroy.bind(this));
+ }
+
+ _onDestroy() {
+ if (this._monitorsChangedId) {
+ Main.layoutManager.disconnect(this._monitorsChangedId);
+ delete this._monitorsChangedId;
+ }
}
async _getLoginSession() {
@@ -517,6 +542,53 @@ export class ScreenShield extends Signal
this.emit('wake-up-screen');
}
+ _createBgLockDialogGroup(monitorIndex) {
+ let monitor = Main.layoutManager.monitors[monitorIndex];
+ let widget = new St.Widget({
+ style_class: 'bgLockDialogGroup-background',
+ x: monitor.x,
+ y: monitor.y,
+ width: monitor.width,
+ height: monitor.height,
+ });
+
+ let bgManager = new Background.BackgroundManager({
+ container: widget,
+ monitorIndex,
+ controlPosition: false,
+ settingsSchema: LOCKDIALOG_BACKGROUND_SCHEMA
+ });
+
+ this._bgManagersLockDialogGroup.push(bgManager);
+
+ this._bgLockDialogGroup.add_child(widget);
+
+ const themeContext = St.ThemeContext.get_for_stage(global.stage);
+
+ let effect = new Shell.BlurEffect({
+ brightness: BLUR_BRIGHTNESS,
+ sigma: BLUR_SIGMA * themeContext.scale_factor,
+ });
+
+ this._scaleChangedId = themeContext.connect('notify::scale-factor', () => {
+ effect.sigma = BLUR_SIGMA * themeContext.scale_factor;
+ });
+
+ widget.add_effect(effect);
+ }
+
+ _updateBgLockDialogGroup() {
+ for (let i = 0; i < this._bgManagersLockDialogGroup.length; i++)
+ this._bgManagersLockDialogGroup[i].destroy();
+
+ this._bgManagersLockDialogGroup = [];
+ this._bgLockDialogGroup.destroy_all_children();
+
+ for (let i = 0; i < Main.layoutManager.monitors.length; i++)
+ this._createBgLockDialogGroup(i);
+ }
+
+
get locked() {
return this._isLocked;
}