Accepting request 824834 from home:qkzhu:branches:GNOME:Factory

- Update gnome-shell-fate324570-Make-GDM-background-image-configurable.patch: 
  to be compatible with 3.36 (boo#1172826).

OBS-URL: https://build.opensuse.org/request/show/824834
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=444
This commit is contained in:
Dominique Leuenberger 2020-08-14 08:37:55 +00:00 committed by Git OBS Bridge
parent 806609c78a
commit 52fa5000e6
3 changed files with 102 additions and 46 deletions

View File

@ -1,68 +1,120 @@
From 7ec0b20a9c8c62f34203e1e93b64764f3fbd20d7 Mon Sep 17 00:00:00 2001
From: Chingkai <chuchingkai@gmail.com>
Date: Fri, 19 Oct 2018 13:25:35 +0800
Subject: [PATCH] screenShield: Make login and lock screen background
configurable
Add a background for lockDialogGroup to make login/lock background
configurable. The default behavior will be retained to what it is
currently, you can change the wallpaper via schema keys.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/680
---
js/ui/screenShield.js | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/data/theme/gnome-shell-sass/widgets/_screen-shield.scss b/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
index 00c549a..57e9ab6 100644
--- a/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
+++ b/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
@@ -65,6 +65,11 @@
box-shadow: 0px 2px 4px rgba(0,0,0,0.6);
}
+.bgLockDialogGroup-background {
+ border: none;
+ background-color: transparent;
+}
+
#lockDialogGroup {
background-color: lighten(#2e3436, 8%);
}
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 842ae6324..7bc954f6c 100644
index 86221a3..2947695 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -26,6 +26,8 @@ const LOCK_DELAY_KEY = 'lock-delay';
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
const DISABLE_LOCK_KEY = 'disable-lock-screen';
@@ -4,6 +4,7 @@ const { AccountsService, Clutter, Gio,
GLib, Graphene, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
+const Background = imports.ui.background;
const GnomeSession = imports.misc.gnomeSession;
const OVirt = imports.gdm.oVirt;
const LoginManager = imports.misc.loginManager;
@@ -16,6 +17,8 @@ const SmartcardManager = imports.misc.smartcardManager;
const { adjustAnimationTime } = imports.ui.environment;
+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';
@@ -25,6 +28,9 @@ const DISABLE_LOCK_KEY = 'disable-lock-screen';
const LOCKED_STATE_STR = 'screenShield.locked';
// fraction of screen height the arrow must reach before completing
// the slide up automatically
@@ -498,6 +500,16 @@ var ScreenShield = class {
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
name: 'lockDialogGroup' });
+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,
@@ -65,6 +71,16 @@ var ScreenShield = class {
name: 'lockDialogGroup',
});
+ // Add background for this._lockDialogGroup
+ this._bgLockDialogGroup = new Clutter.Actor();
+
+ this._lockDialogGroup.add_actor(this._bgLockDialogGroup);
+ this._bgLockDialogGroup.lower_bottom();
+ this._lockDialogGroup.set_child_below_sibling(this._bgLockDialogGroup, null);
+ this._bgManagersLockDialogGroup = [];
+
+ this._updateBgLockDialogGroup();
+ Main.layoutManager.connect('monitors-changed', this._updateBgLockDialogGroup.bind(this));
+ this._monitorsChangedId =
+ Main.layoutManager.connect('monitors-changed', this._updateBgLockDialogGroup.bind(this));
+
this.actor.add_actor(this._lockDialogGroup);
this.actor.add_actor(this._lockScreenGroup);
this.actor.add_actor(this._lockDialogGroup);
@@ -142,6 +158,15 @@ var ScreenShield = class {
this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
@@ -591,6 +603,35 @@ var ScreenShield = class {
this._syncInhibitor();
+
+ this.connect('destroy', this._onDestroy.bind(this));
+ }
+
+ _onDestroy() {
+ if (this._monitorsChangedId) {
+ Main.layoutManager.disconnect(this._monitorsChangedId);
+ delete this._monitorsChangedId;
+ }
}
_setActive(active) {
@@ -473,6 +498,53 @@ var ScreenShield = class {
this.emit('wake-up-screen');
}
+ _createBgLockDialogGroup(monitorIndex) {
+ let monitor = Main.layoutManager.monitors[monitorIndex];
+ let widget = new St.Widget({ style_class: 'screen-shield-background',
+ x: monitor.x,
+ y: monitor.y,
+ width: monitor.width,
+ height: monitor.height });
+ 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: monitorIndex,
+ controlPosition: false,
+ settingsSchema: LOCKDIALOG_BACKGROUND_SCHEMA });
+ 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() {
@ -76,9 +128,7 @@ index 842ae6324..7bc954f6c 100644
+ this._createBgLockDialogGroup(i);
+ }
+
_createBackground(monitorIndex) {
let monitor = Main.layoutManager.monitors[monitorIndex];
let widget = new St.Widget({ style_class: 'screen-shield-background',
--
2.25.0
+
get locked() {
return this._isLocked;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 7 05:43:21 UTC 2020 - QK ZHU <qkzhu@suse.com>
- Update gnome-shell-fate324570-Make-GDM-background-image-configurable.patch:
to be compatible with 3.36 (boo#1172826).
-------------------------------------------------------------------
Thu Jul 16 19:30:26 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -36,7 +36,7 @@ Source2: sle-background.png
Patch1: gnome-shell-private-connection.patch
# PATCH-FIX-OPENSUSE gnome-shell-disable-ibus-when-not-installed.patch bsc#987360 qzhao@suse.com -- disable ibus start when outof Chinese, Japanese, Korean area
Patch2: gnome-shell-disable-ibus-when-not-installed.patch
# PATCH-NEEDS-REBASE gnome-shell-fate324570-Make-GDM-background-image-configurable.patch fate#324570, glgo#GNOME/gnome-shell#680 qkzhu@suse.com -- make GDM background image configurable WAS: PATCH-FEATURE-OPENSUSE
# PATCH-FEATURE-OPENSUSE gnome-shell-fate324570-Make-GDM-background-image-configurable.patch fate#324570, glgo#GNOME/gnome-shell#680, boo#1172826 qkzhu@suse.com -- make GDM background image configurable
Patch4: gnome-shell-fate324570-Make-GDM-background-image-configurable.patch
# PATCH-NEEDS-REBASE gnome-shell-jscSLE9267-Remove-sessionList-of-endSessionDialog.patch jsc#SLE-9267 qkzhu@suse.com -- Remove sessionList of endSessionDialog (WAS: PATCH-FEATURE-OPENSUSE)
Patch5: gnome-shell-jscSLE9267-Remove-sessionList-of-endSessionDialog.patch
@ -178,7 +178,7 @@ This package contains an optional extensions app for managing GNOME Shell extens
%setup -q
%patch1 -p1
%patch2 -p1
#patch4 -p1
%patch4 -p1
#patch5 -p1
%patch6 -p1