gnome-shell/post-changes-for-passwordless-gdm-backport.patch
Joan Torres Lopez f7154df44a
Update passwordless GDM backport patch series
* Add required pre-changes and update post-changes.
* Drop fingeprint fix, it's not needed anymore.

Resolves: https://redhat.atlassian.net/browse/RHEL-232973
2026-08-07 11:54:00 +02:00

279 lines
9.8 KiB
Diff

From 45dd4808e26dabd03c25c126e97b22a20b4bcfa5 Mon Sep 17 00:00:00 2001
From: Joan Torres Lopez <joantolo@redhat.com>
Date: Tue, 2 Jun 2026 12:07:45 +0200
Subject: [PATCH 1/5] Use Object.keys(this._sections) instead of
this._sections.keys()
---
js/gdm/authMenuButton.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/gdm/authMenuButton.js b/js/gdm/authMenuButton.js
index 5aaa45fd3..e2c516585 100644
--- a/js/gdm/authMenuButton.js
+++ b/js/gdm/authMenuButton.js
@@ -252,7 +252,7 @@ export class AuthMenuButton extends St.Button {
this._items.delete(itemKey);
});
- this._sections.keys().forEach(sectionName => {
+ Object.keys(this._sections).forEach(sectionName => {
const itemsInSection = this._findItems({sectionName});
if (itemsInSection.length === 0) {
const section = this._sections.get(sectionName);
--
2.55.0
From 2f4e4d9bff76e6b4db951890b82282cc7a01921a Mon Sep 17 00:00:00 2001
From: Joan Torres Lopez <joantolo@redhat.com>
Date: Tue, 2 Jun 2026 12:52:09 +0200
Subject: [PATCH 2/5] Don't use _once timeout variants
---
js/gdm/authServices.js | 7 +++++--
js/gdm/authServicesLegacy.js | 3 ++-
js/gdm/authServicesSSSDSwitchable.js | 3 ++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/js/gdm/authServices.js b/js/gdm/authServices.js
index d0f7659a5..e13d4106e 100644
--- a/js/gdm/authServices.js
+++ b/js/gdm/authServices.js
@@ -283,8 +283,11 @@ export class AuthServices extends GObject.Object {
_waitPendingMessages() {
const cancellable = this._cancellable;
- const timeoutId = GLib.timeout_add_seconds_once(GLib.PRIORITY_DEFAULT, 10,
- () => cancellable.cancel());
+ const timeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 10,
+ () => {
+ cancellable.cancel();
+ return GLib.SOURCE_REMOVE;
+ });
const {promise, resolve, reject} = Promise.withResolvers();
const task = Gio.Task.new(this, cancellable, () => {
diff --git a/js/gdm/authServicesLegacy.js b/js/gdm/authServicesLegacy.js
index 77f9cece6..0e5c525de 100644
--- a/js/gdm/authServicesLegacy.js
+++ b/js/gdm/authServicesLegacy.js
@@ -132,12 +132,13 @@ export class AuthServicesLegacy extends AuthServices {
this._fingerprintReadyTimeoutId !== 0)
return;
- this._fingerprintReadyTimeoutId = GLib.timeout_add_once(
+ this._fingerprintReadyTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
FINGERPRINT_READY_TIMEOUT_MS,
() => {
this._fingerprintReadyTimeoutId = 0;
this._setFingerprintReady(true);
+ return GLib.SOURCE_REMOVE;
});
}
diff --git a/js/gdm/authServicesSSSDSwitchable.js b/js/gdm/authServicesSSSDSwitchable.js
index cf6a4e1fb..0271d98f2 100644
--- a/js/gdm/authServicesSSSDSwitchable.js
+++ b/js/gdm/authServicesSSSDSwitchable.js
@@ -287,7 +287,7 @@ export class AuthServicesSSSDSwitchable extends AuthServices {
if (!timeout)
return;
- this._webLoginTimeoutId = GLib.timeout_add_seconds_once(GLib.PRIORITY_DEFAULT,
+ this._webLoginTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT,
timeout, () => {
if (this._selectedMechanism?.role !== Role.WEB_LOGIN)
webLoginMechanism.needsRefresh = true;
@@ -295,6 +295,7 @@ export class AuthServicesSSSDSwitchable extends AuthServices {
this.emit('reset', {softReset: true});
this._webLoginTimeoutId = 0;
+ return GLib.SOURCE_REMOVE;
});
}
--
2.55.0
From 398fd1ad475e2092977cb210e12d3403bc0fdbaa Mon Sep 17 00:00:00 2001
From: Joan Torres Lopez <joantolo@redhat.com>
Date: Tue, 9 Jun 2026 09:57:09 +0200
Subject: [PATCH 3/5] gdm: Use alternative to Promise.withResolvers()
It doesn't exist in this version
---
js/gdm/authServices.js | 6 +++++-
js/gdm/userVerifier.js | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/js/gdm/authServices.js b/js/gdm/authServices.js
index e13d4106e..e5cf21c96 100644
--- a/js/gdm/authServices.js
+++ b/js/gdm/authServices.js
@@ -289,7 +289,11 @@ export class AuthServices extends GObject.Object {
return GLib.SOURCE_REMOVE;
});
- const {promise, resolve, reject} = Promise.withResolvers();
+ let resolve, reject;
+ const promise = new Promise((res, rej) => {
+ resolve = res;
+ reject = rej;
+ });
const task = Gio.Task.new(this, cancellable, () => {
try {
const res = task.propagate_boolean();
diff --git a/js/gdm/userVerifier.js b/js/gdm/userVerifier.js
index 02decbf86..27777c6f1 100644
--- a/js/gdm/userVerifier.js
+++ b/js/gdm/userVerifier.js
@@ -223,7 +223,11 @@ export class ShellUserVerifier extends Signals.EventEmitter {
return;
const message = this.currentMessage;
- const {promise, resolve} = Promise.withResolvers();
+ let resolve, reject;
+ const promise = new Promise((res, rej) => {
+ resolve = res;
+ reject = rej;
+ });
this._showMessageResolver = resolve;
this.emit('show-message', {
--
2.55.0
From dda52fc6a0e12af8dc3b6eca5f853923c311d837 Mon Sep 17 00:00:00 2001
From: Joan Torres Lopez <joantolo@redhat.com>
Date: Thu, 6 Aug 2026 23:58:46 +0200
Subject: [PATCH 4/5] gdm: Use old ButtonMask enum
In this version it still used as ONE, TWO and THREE
---
js/gdm/authList.js | 2 +-
js/gdm/authMenuButton.js | 2 +-
js/gdm/authPrompt.js | 2 +-
js/gdm/webLogin.js | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/js/gdm/authList.js b/js/gdm/authList.js
index 81c204e7f..8e035da91 100644
--- a/js/gdm/authList.js
+++ b/js/gdm/authList.js
@@ -70,7 +70,7 @@ class ItemIcon extends St.Button {
constructor(iconName, iconTitle, iconSubtitle) {
super({
style_class: 'login-dialog-item-icon',
- button_mask: St.ButtonMask.PRIMARY | St.ButtonMask.SECONDARY,
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
iconName,
});
diff --git a/js/gdm/authMenuButton.js b/js/gdm/authMenuButton.js
index e2c516585..ca9a0b9d1 100644
--- a/js/gdm/authMenuButton.js
+++ b/js/gdm/authMenuButton.js
@@ -149,7 +149,7 @@ export class AuthMenuButton extends St.Button {
style_class: 'login-dialog-button login-dialog-auth-menu-button',
can_focus: true,
accessible_role: Atk.Role.MENU,
- button_mask: St.ButtonMask.PRIMARY | St.ButtonMask.SECONDARY,
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
});
this.bind_property('reactive',
this, 'can-focus',
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 007c1538c..7e69525f9 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -291,7 +291,7 @@ export const AuthPrompt = GObject.registerClass({
this._authButton = new St.Button({
style_class: 'login-button',
- button_mask: St.ButtonMask.PRIMARY | St.ButtonMask.SECONDARY,
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
can_focus: true,
x_align: Clutter.ActorAlign.CENTER,
x_expand: true,
diff --git a/js/gdm/webLogin.js b/js/gdm/webLogin.js
index 3b6496296..34c371b8d 100644
--- a/js/gdm/webLogin.js
+++ b/js/gdm/webLogin.js
@@ -200,7 +200,7 @@ export class WebLoginDialog extends St.Widget {
style_class: 'web-login-prompt-button',
can_focus: true,
accessible_name: b.label,
- button_mask: St.ButtonMask.PRIMARY | St.ButtonMask.SECONDARY,
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
child: new St.Label({
text: b.label,
style_class: 'login-button-label',
--
2.55.0
From 5e3b6d53a6e34e27e6c38d517fe51cfe52b2b96e Mon Sep 17 00:00:00 2001
From: Joan Torres Lopez <joantolo@redhat.com>
Date: Fri, 7 Aug 2026 11:42:37 +0200
Subject: [PATCH 5/5] style: Fix color styles to adapt when on light-mode
(classic-mode)
---
data/theme/gnome-shell-sass/widgets/_login-lock.scss | 8 ++++----
data/theme/gnome-shell-sass/widgets/_qr-code.scss | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/data/theme/gnome-shell-sass/widgets/_login-lock.scss b/data/theme/gnome-shell-sass/widgets/_login-lock.scss
index 04f24a789..fbcb4d20f 100644
--- a/data/theme/gnome-shell-sass/widgets/_login-lock.scss
+++ b/data/theme/gnome-shell-sass/widgets/_login-lock.scss
@@ -92,12 +92,12 @@ $_gdm_dialog_width: 25em;
&-label {
@include fontsize($base_font_size - 1);
font-weight: bold;
- color: $_gdm_fg;
+ color: $fg_color;
}
}
.login-dialog-auth-menu-item-icon {
- color: $_gdm_fg;
+ color: $fg_color;
icon-size: $scalable_icon_size;
margin-right: $base_margin * 2;
}
@@ -106,13 +106,13 @@ $_gdm_dialog_width: 25em;
spacing: $base_padding * .5;
&-name {
- color: $_gdm_fg;
+ color: $fg_color;
@include fontsize($base_font_size);
font-weight: bold;
}
&-description {
- color: $_gdm_fg;
+ color: $fg_color;
@include fontsize($base_font_size - 1);
}
}
diff --git a/data/theme/gnome-shell-sass/widgets/_qr-code.scss b/data/theme/gnome-shell-sass/widgets/_qr-code.scss
index da04425bd..98ecf7b0f 100644
--- a/data/theme/gnome-shell-sass/widgets/_qr-code.scss
+++ b/data/theme/gnome-shell-sass/widgets/_qr-code.scss
@@ -6,6 +6,7 @@
$qrcode_bg_color: mix($fg_color, $bg_color, 8%);
background-color: $qrcode_bg_color;
border-color: $qrcode_bg_color;
+ color: $fg_color;
} @else {
background-color: $system_fg_color;
border-color: $system_fg_color;
--
2.55.0